2 years ago
#63297

thi
Why are the results of the gamm4 function of the gamm4 package different from the standard error displayed by $mer and $gam?
id:268levels
group:10levels
I used the gamm4
function of the package gamm4
to fit the following model.
gamm4_1 <- gamm4(y~z1+z2+z3+age+height+time+bmi,random=~(1|id)+(1|group),data=data,family=binomial)
In this case, the result is given as a list of mer
and gam
, but the standard error of mer
is different from the standard error of gam
.
summary(gamm4_1$mer)$coefficients
Estimate Std. Error z value Pr(>|z|)
X(Intercept) -5.59491005 0.001737789 -3219.55651 0.000000e+00
Xz1 -0.40110690 0.001739238 -230.62215 0.000000e+00
Xz2 -0.75774666 0.001737744 -436.05193 0.000000e+00
Xz3 -0.16008244 0.001737414 -92.13836 0.000000e+00
Xage -0.05760610 0.001636062 -35.21022 1.394896e-271
Xheight 0.06065821 0.001120702 54.12520 0.000000e+00
Xtime 0.08710019 0.001737386 50.13290 0.000000e+00
Xbmi 0.04417464 0.001732751 25.49393 2.301696e-143
summary(gamm4_1$gam)
Family: binomial
Link function: logit
Formula:
y ~ z1 + z2 + z3 + age + height + time + bmi
Parametric coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -5.59491 2.69546 -2.076 0.03792 *
z1 -0.40111 0.17302 -2.318 0.02044 *
z2 -0.75775 0.37128 -2.041 0.04126 *
z3 -0.16008 0.34723 -0.461 0.64478
age -0.05761 0.01850 -3.115 0.00184 **
height 0.06066 0.01329 4.563 5.03e-06 ***
time 0.08710 0.06609 1.318 0.18750
bmi 0.04417 0.03350 1.319 0.18733
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Why are the coefficients the same, but the standard error values are completely different?
r
lme4
gam
mgcv
0 Answers
Your Answer