Message-ID: <CAHLnndY1hay+2sU-K+LSJrrzMJAZCtb4ef25BT_HYufxd07drw@mail.gmail.com>
Date: 2015-05-26T19:46:11Z
From: Li Li
Subject: lme function to obtain pvalue for fixed effect
In-Reply-To: <BLU406-EAS16766F94C10A98D0545848AC4CC0@phx.gbl>
Thanks so much for replying.
Yes LimerTest package could be used to get pvalues when using lmer
function. But still the summary and anova function give different
pvalues.
Hanna
2015-05-26 15:19 GMT-04:00, byron vinueza <byronvinu_8 at hotmail.com>:
> 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
>