[R-sig-ME] lme function to obtain pvalue for fixed effect

byron vinueza byronvinu_8 at hotmail.com
Tue May 26 21:19:08 CEST 2015


You can use the lmerTest package .





Enviado desde mi iPhone

> El 26/5/2015, a las 13:18, li li <hannah.hlx at gmail.com> escribió:
> 
> Hi all,
>  I am using the lme function to run a random coefficient model. Please see
> output (mod1) as below.
>  I need to obtain the pvalue for the fixed effect. As you can see,
> the pvalues given using the summary function is different from the
> resutls given in anova function.
> Why should they be different and which one is the correct one to use?
>   Thanks!
>      Hanna
> 
> 
>> summary(mod1)
> Linear mixed-effects model fit by REML
> Data: minus20C1
>        AIC       BIC   logLik
>  -82.60042 -70.15763 49.30021
> 
> Random effects:
> Formula: ~1 + months | lot
> Structure: General positive-definite, Log-Cholesky parametrization
>            StdDev       Corr
> (Intercept) 8.907584e-03 (Intr)
> months      6.039781e-05 -0.096
> Residual    4.471243e-02
> 
> Fixed effects: ti ~ type * months
>                     Value   Std.Error DF   t-value p-value
> (Intercept)     0.25831245 0.016891587 31 15.292373  0.0000
> type             0.13502089 0.026676101  4  5.061493  0.0072
> months          0.00804790 0.001218941 31  6.602368  0.0000
> type:months -0.00693679 0.002981859 31 -2.326329  0.0267
> Correlation:
>               (Intr) typ months
> type        -0.633
> months         -0.785  0.497
> type:months  0.321 -0.762 -0.409
> 
> Standardized Within-Group Residuals:
>          Min            Q1           Med            Q3           Max
> -2.162856e+00 -1.962972e-01 -2.771184e-05  3.749035e-01  2.088392e+00
> 
> Number of Observations: 39
> Number of Groups: 6
>> anova(mod1)
>            numDF denDF   F-value p-value
> (Intercept)     1    31 2084.0265  <.0001
> type            1     4   10.8957  0.0299
> months          1    31   38.3462  <.0001
> type:months     1    31    5.4118  0.0267
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


More information about the R-sig-mixed-models mailing list