- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在使用 lme4 和 lmerTest 时,我偶然发现了影响 R 3.3.2(和 .3 也是!)的 Mac OS 版本的问题。
lmerTest 产生错误:
Error in calculation of the Satterthwaite's approximation. The output of lme4 package is returned summary from lme4 is returned some computational error has occurred in lmerTest
library(lme4)
#' start of data creation
mydat <-
structure(list(ID = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29,
1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29), sex = c(1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1,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AT"), class = "factor"),
value = c(0.674,
0.561, 0.543, 0.563, 0.697, 0.608, 0.56, 0.448, 0.626, 0.515,
0.568, 0.528, 0.587, 0.532, 0.547, 0.514, 0.587, 0.572, 0.559,
0.569, 0.462, 0.531, 0.477, 0.582, 0.583, 0.569, 0.563, 0.576,
0.84, 0.638, 0.69, 0.707, 0.704, 0.627, 0.769, 0.637, 0.515,
0.669, 0.699, 0.626, 0.59, 0.639, 0.501, 0.632, 0.624, 0.641,
0.669, 0.656, 0.556, 0.569, 0.633, 0.608, 0.616, 0.664, 0.666,
0.669, 0.545, 0.514, 0.45, 0.585, 0.547, 0.572, 0.577, 0.458,
0.47, 0.537, 0.532, 0.455, 0.62, 0.501, 0.506, 0.44, 0.499, 0.577,
0.457, 0.481, 0.522, 0.516, 0.513, 0.559, 0.571, 0.515, 0.575,
0.521, 0.44, 0.637, 0.521, 0.634, 0.552, 0.581, 0.55, 0.553,
0.522, 0.634, 0.631, 0.512, 0.603, 0.593, 0.58, 0.442, 0.53,
0.463, 0.587, 0.538, 0.48, 0.557, 0.482, 0.53, 0.592, 0.445,
0.526, 0.45, 0.551, 0.51, 0.678, 0.64, 0.599, 0.589, 0.627, 0.621,
0.601, 0.526, 0.619, 0.599, 0.668, 0.615, 0.621, 0.561, 0.532,
0.56, 0.578, 0.686, 0.57, 0.457, 0.563, 0.61, 0.513, 0.638, 0.594,
0.777, 0.562, 0.663, 0.538, 0.471, 0.518, 0.47, 0.535, 0.644,
0.605, 0.474, 0.468, 0.563, 0.539, 0.47, 0.538, 0.453, 0.494,
0.576, 0.418, 0.609, 0.528, 0.453, 0.569, 0.484, 0.486, 0.558,
0.621, 0.465, 0.691, 0.398, 0.539, 0.574), Alter = c(45, 47,
51, 44, 35, 26, 60, 44, 42, 50, 42, 51, 57, 23, 26, 29, 29, 50,
45, 61, 61, 58, 32, 27, 49, 45, 64, 28, 45, 47, 51, 44, 35, 26,
60, 44, 50, 42, 51, 57, 23, 26, 29, 29, 50, 45, 61, 61, 58, 32,
27, 49, 27, 45, 64, 28, 45, 47, 51, 44, 35, 26, 60, 44, 42, 50,
42, 51, 57, 23, 26, 29, 29, 50, 45, 61, 61, 58, 32, 27, 49, 27,
45, 64, 28, 45, 47, 51, 44, 35, 26, 60, 44, 42, 50, 42, 51, 57,
23, 26, 29, 29, 50, 45, 61, 61, 58, 32, 27, 49, 27, 45, 64, 28,
45, 47, 51, 44, 35, 26, 60, 44, 42, 50, 42, 51, 57, 23, 26, 29,
29, 50, 45, 61, 61, 58, 32, 27, 49, 27, 45, 64, 28, 45, 47, 51,
44, 35, 26, 60, 44, 42, 50, 42, 51, 57, 23, 26, 29, 29, 50, 45,
61, 61, 58, 32, 27, 49, 27, 45, 64, 28),
BMI = c(29.7506923675537,
28.8, 28.8385677337646, 41.48, 27.7186069488525, 29.54, 38.06,
35.8453826904297, 35.57, 31.77, 31.75, 32.78, 30.5336246490479,
29.1074104309082, 36.4690246582031, 31.7769088745117, 31.5393238067627,
31.5596752166748, 27.593786239624, 30.8192825317383, 27.0799140930176,
31.481481552124, 29.0328979492188, 24.52, 29.4029197692871, 35.6112785339355,
28.2401905059814, 28.8979587554932, 29.7506923675537, 28.8, 28.8385677337646,
41.48, 27.7186069488525, 29.54, 38.06, 35.8453826904297, 31.77,
31.75, 32.78, 30.5336246490479, 29.1074104309082, 36.4690246582031,
31.7769088745117, 31.5393238067627, 31.5596752166748, 27.593786239624,
30.8192825317383, 27.0799140930176, 31.481481552124, 29.0328979492188,
24.52, 29.4029197692871, 23.0956573486328, 35.6112785339355,
28.2401905059814, 28.8979587554932, 29.7506923675537, 28.8, 28.8385677337646,
41.48, 27.7186069488525, 29.54, 38.06, 35.8453826904297, 35.57,
31.77, 31.75, 32.78, 30.5336246490479, 29.1074104309082, 36.4690246582031,
31.7769088745117, 31.5393238067627, 31.5596752166748, 27.593786239624,
30.8192825317383, 27.0799140930176, 31.481481552124, 29.0328979492188,
24.52, 29.4029197692871, 23.0956573486328, 35.6112785339355,
28.2401905059814, 28.8979587554932, 29.7506923675537, 28.8, 28.8385677337646,
41.48, 27.7186069488525, 29.54, 38.06, 35.8453826904297, 35.57,
31.77, 31.75, 32.78, 30.5336246490479, 29.1074104309082, 36.4690246582031,
31.7769088745117, 31.5393238067627, 31.5596752166748, 27.593786239624,
30.8192825317383, 27.0799140930176, 31.481481552124, 29.0328979492188,
24.52, 29.4029197692871, 23.0956573486328, 35.6112785339355,
28.2401905059814, 28.8979587554932, 29.7506923675537, 28.8, 28.8385677337646,
41.48, 27.7186069488525, 29.54, 38.06, 35.8453826904297, 35.57,
31.77, 31.75, 32.78, 30.5336246490479, 29.1074104309082, 36.4690246582031,
31.7769088745117, 31.5393238067627, 31.5596752166748, 27.593786239624,
30.8192825317383, 27.0799140930176, 31.481481552124, 29.0328979492188,
24.52, 29.4029197692871, 23.0956573486328, 35.6112785339355,
28.2401905059814, 28.8979587554932, 29.7506923675537, 28.8, 28.8385677337646,
41.48, 27.7186069488525, 29.54, 38.06, 35.8453826904297, 35.57,
31.77, 31.75, 32.78, 30.5336246490479, 29.1074104309082, 36.4690246582031,
31.7769088745117, 31.5393238067627, 31.5596752166748, 27.593786239624,
30.8192825317383, 27.0799140930176, 31.481481552124, 29.0328979492188,
24.52, 29.4029197692871, 23.0956573486328, 35.6112785339355,
28.2401905059814, 28.8979587554932)), .Names = c("ID", "sex",
"ROI", "value", "Alter", "BMI"), row.names = c(NA, -172L), class = c("tbl_df","tbl", "data.frame"))
#' end of data creation
library(lmerTest)
mod <- lmer(value~Alter+ROI+BMI+(1|ID),data=mydat,REML=F)
summary(mod)
sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.3
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lmerTest_2.0-33 lme4_1.1-12 Matrix_1.2-8
loaded via a namespace (and not attached):
[1] Rcpp_0.12.9 Formula_1.2-1 knitr_1.15.1 magrittr_1.5 cluster_2.0.5 splines_3.3.3 MASS_7.3-45 munsell_0.4.3 [9] colorspace_1.3-2 lattice_0.20-34 minqa_1.2.4 stringr_1.1.0 plyr_1.8.4 tools_3.3.3 nnet_7.3-12 grid_3.3.3 [17] data.table_1.10.0 checkmate_1.8.2 htmlTable_1.8 gtable_0.2.0 nlme_3.1-131 latticeExtra_0.6-28 htmltools_0.3.5 digest_0.6.11 [25] survival_2.40-1 lazyeval_0.2.0 assertthat_0.1 tibble_1.2 gridExtra_2.2.1 RColorBrewer_1.1-2 nloptr_1.0.4 ggplot2_2.2.1 [33] base64enc_0.1-3 acepack_1.4.1 rpart_4.1-10 stringi_1.1.2 backports_1.0.4 scales_0.4.1 Hmisc_4.0-2 foreign_0.8-67
最佳答案
经过反复尝试,代码在R3.3.3下运行,虽然我的系统没有变化。我是在做梦吗?有点超自然……我很困惑。抱歉打扰了。
R version 3.3.3 (2017-03-06) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: macOS Sierra 10.12.3
locale: [1] C
attached base packages: [1] stats graphics grDevices utils
datasets methods baseother attached packages: [1] lmerTest_2.0-33 lme4_1.1-12
Matrix_1.2-8loaded via a namespace (and not attached): [1] Rcpp_0.12.9
nloptr_1.0.4 RColorBrewer_1.1-2 plyr_1.8.4
base64enc_0.1-3 tools_3.3.3 rpart_4.1-10
digest_0.6.12 [9] tibble_1.2 nlme_3.1-131
gtable_0.2.0 htmlTable_1.9 checkmate_1.8.2
lattice_0.20-34 gridExtra_2.2.1 stringr_1.2.0 [17] cluster_2.0.5 knitr_1.15.1 htmlwidgets_0.8 grid_3.3.3 nnet_7.3-12 data.table_1.10.0 survival_2.40-1
foreign_0.8-67 [25] latticeExtra_0.6-28 minqa_1.2.4
Formula_1.2-1 ggplot2_2.2.1 magrittr_1.5
Hmisc_4.0-2 scales_0.4.1 backports_1.0.5 [33] htmltools_0.3.5 MASS_7.3-45 splines_3.3.3
assertthat_0.1 colorspace_1.3-2 stringi_1.1.2
acepack_1.4.1 lazyeval_0.2.0 [41] munsell_0.4.3
关于R 3.3.2 : lme4 + lmerTest problems under Mac OS Sierra,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42705396/
我正在使用线性混合效应模型来确定两个变量随时间变化的关系,模型 - data(mtcars) # linear mixed effects model mlme data.frame(conf) E
我正在用 R 开发一个简单的模型: fit<-lme(x~y, data, random=~1|subject) 但我一直收到这个错误: Error in na.fail.default(list(h
在 R 的 nlme 包中的 lme() 函数的标准示例中: fm2 1) ...) 也许能够打印固定效应参数的摘要对您有用......? printCoefmat(summary(fm2)$tTa
我如何在线性混合模型中提取系数(b0 和 b1)及其各自的标准误差(图),例如: Better fits for a linear model 使用相同的数据集(df),以及拟合模型(fitL1):我
我正在 nlme 包中通过 REML 拟合线性混合效果模型。这些是对我有用的代码: # Linear mixed-effects model fit by REML (intercept and no
背景 我正在尝试根据某些参数在函数中拟合混合模型。如果我想使用 contrast来自 library(contrast)我必须使用变通方法,如 contrast使用 call来自 lme 的插槽确定
我有示例数据和模型 x coef(model.mx) (Intercept) x 1 54.88302 19.18001 2 54.88298 19.18000 3
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎与 help center 中定义的范围内的编程无关。 . 关闭 3 年前。 Improve
如何为以下模型初始化非结构化协方差矩阵? y5 个科目。 关于r - 在 lme 中初始化协方差结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflo
我有一个包含 5 个变量的数据框:批处理/晶圆/序列号/电压/放大倍数。在此数据框中,有 1020 个按 Serial_number 分组的子集。每个子集都有一定数量的测量数据点(电压放大)。 我用
我必须对使用 nlme 包中的 lme() 函数制作的多个大型模型的置信区间进行一些转换。我正在使用 intervals() 函数来获取间隔,但是无法将其转换为数据帧。有什么方法可以将其变成可访问的数
我开始用 nlme 编写一个构建线性混合模型的函数。我遇到错误:Error in eval(expr, envir, enclos) : object 'value' not found,我认为这是由
我有数据,其中“飞行速度”是一个响应变量,group(实验/控制),test(第一/第二),FL (燃料负荷,来自瘦体重的百分比:从 0 到 ~25%),wing(机翼长度,以毫米为单位)。由于我们对
我已经成功地拟合了一个线性混合效应模型,我正在寻找为各个组提取随机效应分量。我知道可以使用提取随机效应的完整列表 random.effects(model) 然后 print(random.effec
我有以下型号 x <- rep(seq(0, 100, by=1), 10) y <- 15 + 2*rnorm(1010, 10, 4)*x + rnorm(1010, 20, 100) id
4 个 hive 配备了传感器,用于收集 hive 内的温度、湿度、压力和分贝。这些是响应变量。 治疗是wifi暴露,实验组从第1天到第20天,然后从第35-45天再次暴露在wifi下,直到第54天收
如果有人能帮我解决这个问题,我会很高兴。我有重复测量设计的数据,我们测试了鸟类感染前后的 react ( time.dep )( exper )。我们还有FL (燃料负荷,瘦体重百分比),脂肪评分和组
我是这方面的新手,所以我无法确定这是否愚蠢。 基本上,我想在一个巨大的数据集中的所有连续变量之间做成对的混合效应模型。显而易见的替代方案是简单的 spearman 相关,但我有我的理由,要解释我为什么
有没有办法在 nlme 包 lme 模型中获得随机项的方差? Random effects: Formula: ~t | UID Structure: General positive-defin
我目前正在阅读 Andy Field 的书,使用 R 发现统计数据。第 14 章是关于混合建模的,他使用了 lme来自 nlme 的函数包。 他使用快速约会数据创建的模型是这样的: speedDate
我是一名优秀的程序员,十分优秀!