regression

How to extract the goodness-of-fit statistics from lmer() model for msummary from modelsummary package

对着背影说爱祢 提交于 2021-02-04 21:02:03
问题 I am using lmerTest::lmer() to perform linear regression with repeated measures data. My model contains a fixed effect (factor with 5 levels) and a random effect (subject): library(lmerTest) model_lm <- lmer(likertscore ~ task.f + (1 | subject), data = df_long) I would like to include the total number of observations, the number of subjects, total R^2, and the R^2 of the fixed effects in the regression table which I generate with modelsummary() . I tried to extract these and build a gof_map

How to manually compute the p-value of t-statistic in linear regression

让人想犯罪 __ 提交于 2021-02-04 17:36:09
问题 I did a linear regression for a two tailed t-test with 178 degrees of freedom. The summary function gives me two p-values for my two t-values. t value Pr(>|t|) 5.06 1.04e-06 *** 10.09 < 2e-16 *** ... ... F-statistic: 101.8 on 1 and 178 DF, p-value: < 2.2e-16 I want to calculate manually the p-value of the t-values with this formula: p = 1 - 2*F(|t|) p_value_1 <- 1 - 2 * pt(abs(t_1), 178) p_value_2 <- 1 - 2 * pt(abs(t_2), 178) I don't get the same p-values as in the model summary. Therefore, I

Rolling multiple regression panel data

拜拜、爱过 提交于 2021-02-04 16:47:27
问题 I am trying to perform a rolling regression for time t over the last 36 months for companies with observations for 18 of these months, but I am not able to make the function work. I only want the coefficient for var1. X, y, z are control variables. Here is a sample of the data and the code I am trying to run. structure(list(Year = c(2018, 2014, 2008, 2004, 2005, 2002, 2010, 2008, 2013, 1998), Month = c(6, 12, 4, 6, 4, 8, 12, 11, 3, 3), ISIN = c("NO0004895103", "NO0010571680", "NO0010010473",

目标检测:TTFNet: Training-Time-Friendly Network for Real-Time Object Detection

笑着哭i 提交于 2021-02-03 08:34:43
论文出发点: 当期大多数检测器很难同时取得 训练时间短、快速推理快、精度高 。 论文改进点: (1)TTFNet 采用了 light-head + single-stage + anchor-free 的设计,用以保持高速推理。 (2)TTFNet 引入一种利用高斯核对训练样本进行编码的新方法 。因为作者观察到:从注释框中编码更多的训练样本与增加批处理大小具有相似的作用, 这有助于扩大学习速率和加速训练过程 。 (3)此外,为了更好地利用信息,TTFNet 还采用了主动样本权重 。 网络分类: 第一类:依赖 heavy-head 或者 complex post-processing,可以取得较高的精度和较快的收敛速度,但会导致推理速度的降低; 第二类:简化 detection head 或者 post-processing,目的是精度高、推理快,但由于网络的简化,使其严重依赖 data-augmentation 以及 long-time schedule,导致需要较长的训练周期。 第一类通常需要12epochs, 而centernet需要14epochs. CenterNet 收敛速度慢分析:在做尺寸回归时,只关注了对象中心点的一个sample,忽略了中心点附近的sample。 缩短训练时间: 提出利用高斯核生成高质量训练样本的新方法。 (1

经典神经网络 | Faster R-CNN 论文解析

喜欢而已 提交于 2021-02-01 11:29:08
点击上方“ 计算机视觉cv ”即可“进入公众号” 重磅干货第一时间送达 论文题目:Faster R-CNN: T owards Real-Time Object Detection with Region Proposal Networks 论文链接:https://arxiv.org/abs/1506.01497 作者及单位 研究目标 Faster R-CNN是为了改进Fast R-CNN而提出来的。因为在Fast R-CNN文章中的测试时间是不包括search selective时间的,而在测试时很大的一部分时间要耗费在候选区域的提取上。所以作者提出了 RPN 来提取候选框,使时间大大的减少了。 Faster R—CNN网络介绍 Faster R—CNN结构 Faster R—CNN具体可分为四个结构: Conv layers:作为一种CNN网络目标检测方法,Faster RCNN首先使用一组基础的conv+relu+pooling层提取image的 feature maps 。该feature maps被共享用于后续RPN层和全连接层。 Region Proposal Networks:RPN网络用于生成region proposals。该层通过softmax判断anchors属于 positive或者 negative,再利用bounding box

通俗易懂理解——条件随机场CRF

青春壹個敷衍的年華 提交于 2021-01-30 08:30:35
https://mp.weixin.qq.com/s?__biz=MzIyNzE5NjExMA==&mid=2651342812&idx=1&sn=2f74c852200d6868f68a2f05ba561ac8&chksm=f3980a7dc4ef836b764c7ad2bab7c92e696074af43efa2a6be03d686fcec0a4a91a05a116b38&scene=178&cur_album_id=1381650339941761024&exportkey=AaZpj6rbOKQmUg2WIvFt0k0%3D&pass_ticket=lXzBpkoZ2YPJsUPAT3fbhToQqpCP%2BpcjC24v76SUrC6t0zqXhUNtg4RI8W8iC6It&wx_header=0#rd 前言 CRF是一个概率无向图模型,在NLP领域应用广泛,目前大部分的序列标注问题(分词、实体识别等)都会采用Neural Network+CRF作为baseline,本文将会对CRF做一个基本的介绍,并讲解其推导过程。 CRF解决的是什么问题 假设你有许多小明同学一天内不同时段的照片,从小明起床到睡觉各个时间段都有。现在的任务是对这些照片进行分类。比如有的照片是吃饭,那就给它打上吃饭的标签;有的照片是跑步时拍的,那就打上跑步的标签;有的照片是开会时拍的

How to fit a data set to an specific function by trial and error or a better specific alternative in R?

Deadly 提交于 2021-01-29 20:23:10
问题 I have a data set and I want to adjust to the following function and find the parameters a and b: I tried the nonlinear least squares approach, however, I'd like to try by trial and error, using a vector with values for a, and another for b, then plot all the alternatives mixing this values to choose a better fit. library(readxl) library(ggplot2) x <- c(52.67, 46.80, 41.74, 40.45) y <- c(1.73, 1.84, 1.79, 1.45) df <- data.frame(x,y) ggplot(data = df, aes(x, y))+ geom_point()+ stat_smooth

Response variable out of range -> using gamlss in r LOGNO

旧城冷巷雨未停 提交于 2021-01-29 18:32:55
问题 I am new to the function GAMLSS in r, and when I run my code I always get this error: Response Variable out of range After looking into the data frame, I realized the issue was one of response variables was 0.0000. I was wondering if someone could explain to me why 0 is out of range and possible solutions to go around it (ex. such as replacement the values)? 回答1: LOGNO family corresponds to the log-normal distribution, which is defined for positive values only. The possible solutions might be

Multivariate Regression Method [closed]

China☆狼群 提交于 2021-01-29 15:51:49
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 days ago . Improve this question I would like to ask here one question about (I assume) the regression model. My task is to deduce the equation from the 4-dimensional dataset. During my research, I have not noticed any regression model that would fit my needs, primarily due to the fact that the equation that I

从BERT、XLNet到MPNet,细看NLP预训练模型发展变迁史

隐身守侯 提交于 2021-01-29 15:49:26
20世纪以来,自然语言处理(NLP)领域的发展涌现了许多创新和突破。NLP中许多之前机器不可能完成的任务,如阅读理解、人机对话、自动写新闻稿等,正逐渐成为现实,甚至超越了人类的表现。 如果总结过去20年里,无数先辈辛劳付出带来的璀璨成果,以下3个代表性工作列入NLP名人堂,应该实至名归: 1)2003年Bengio提出神经网络语言模型NNLM, 从此统一了NLP的特征形式——Embedding; 2)2013年Mikolov提出词向量Word2vec ,延续NNLM又引入了大规模预训练(Pretrain)的思路; 3)2017年Vaswani提出Transformer模型, 实现用一个模型处理多种NLP任务。 基于Transformer架构,2018年底开始出现一大批预训练语言模型,刷新众多NLP任务,形成新的里程碑事件。本文将跨越2018-2020,着眼于3个预训练代表性模型BERT、XLNet和MPNet,从以下4个章节介绍NLP预训练语言模型的发展变迁史: 1.BERT 原理及 MLM 简述 2.XLNet 原理及 PLM 简述 3.MPNet 原理及创新点简述 4.NLP预训练模型趋势跟踪 附录:快速上手BERT的4大工具包 1.BERT 原理及 MLM 简述 自谷歌2018年底开源BERT,NLP界的游戏规则某种程度上被“颠覆”了;一时间,这个芝麻街的可爱小黄人形象