[R-sig-ME] estimating AR1 parameters of level one error using lme
Daniel Wright
Daniel.Wright at act.org
Mon May 18 20:01:36 CEST 2015
It may also be convenient to use the gls function in nlme.
This is used in https://www.researchgate.net/publication/23134911_Multilevel_modelling_Beyond_the_basic_applications
and in http://www.ats.ucla.edu/stat/r/examples/alda/ch7.htm which is the UCLA page for Singer and Willet's wonderful book.
-----Original Message-----
From: R-sig-mixed-models [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Asher Strauss
Sent: Saturday, May 16, 2015 1:19 AM
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] estimating AR1 parameters of level one error using lme
Hi all,
I am new to using R for mixed effects (have been using SPSS until now), please for give me if this is a trivial question.
I am trying to understand how to estimate AR1 parameters of level one error using lme (I have understood that specifying level one variance-covariance matrix is not easily possible in lmer, is this true?).
When using SPSS one estimates two parameters: AR1 diagonal and AR1 rho. I am searching for an equivalent command in R.
for example using the Glucose data from the nlme package:
data(Glucose)
fGlucose<-filter(Glucose,Meal=="10am")
summary(
lme(
fixed=conc~Time,
random=~1+Time|Subject,
method="REML",
data=fGlucose,
na.action="na.omit",
correlation=corAR1(form=~1+Time|Subject))
)
I get an out put of:
Correlation Structure: ARMA(1,0)
Formula: ~1 + Time | Subject
Parameter estimate(s):
Phi1
0.4334469
is Phi1 equivalent to Rho? I do not believe so, since when estimating AR1 diagonal and AR1 rho using SPSS I received 1.349 and -0.942 respectively.
here is the SPSS syntax I am using:
COMPUTE filter_$=(Meal="10am").
VARIABLE LABELS filter_$ 'Meal="10am" (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.
MIXED conc WITH Time
/CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1)
SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
/FIXED=INTERCEPT Time | SSTYPE(3)
/METHOD=REML
/PRINT=SOLUTION TESTCOV
/RANDOM=INTERCEPT Time | SUBJECT(Subject)
/REPEATED=Time | SUBJECT(Subject)COVTYPE(AR1).
Thank you!
Asher
[[alternative HTML version deleted]]
_______________________________________________
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