[R] lme
Peter B. Mandeville
mandevip at uaslp.mx
Thu Jul 1 06:02:14 CEST 1999
I am using rw0641.
In my continuing quest to understand repeated measures analysis, I again
return to lme. I exported the Potthoff and Roy data Orthodont.dat from
S-PLUS 4.5 to avoid capture errors and ran the examples in the R help. I
imported the data.frame with
data <- read.table("Orthodont.dat",header=T)
attach(data)
and created the objects
Orthodont.fit1 <- lme(fixed=distance~age,random=~age)
Orthodont.fit2 <- lme(fixed=distance~age*Sex,random=~age)
which appear to be the R equivalent of the objects created in Pinheiro and
Bates 1995 (lme and nlme).
The code
fm1 <- lmList(distance~age|Subject,data)
generated the error message
Error: couldn't find function "restart"
without 'data' it doesn't run.
The code
plot(Orthodont.fit1)
generated the error message
Error: couldn't find function "xyplot"
I suppose that a graph such as appears in Pinheiro and Bates 1995 (lme and
nlme) and in S-PLUS4 : Guide to Statistics is generated by the plot method?
The code given in S-PLUS4 : Guide to Statistics page 285 does generate the
graph.
plot(age,distance,type="n",xlab="Age (years)",ylab="Distance (mm)")
points(age[Sex=="0"],distance[Sex=="0"],type="p",pch=0)
points(Age[Sex=="1"],distance[Sex=="1"],type="p",pch=5)
for(i in unique(Subject))
lines(Age[Subject==i],distance[Subject==i],type="l",lty=2)
The function numIter doesn't function
Orthodont.fit1$numIter
produces
NULL
Most distressing is the fact that
summary(Orthodont.fit2)
produces the same fixed effects values
(Intercept) 16.340625
Age 0.784375
Sex 1.032102
Age.Sex -0.0304830
as Pinheiro and Bates 1995 (lme and nlme) but everything else is very
distinct.
Can someone please help?
Thank you very much.
Peter B.
--
Peter B. Mandeville mandevip at deimos.tc.uaslp.mx
Jefe del Depto. de Informática y Bioestadística rpe1531 at pasteur.fmed.uaslp.mx
Facultad de Medicine Tel: 48 26-23-45 ext. 232
Universidad Autónoma de San Luis Potosí Fax: 48 28-23-52
Av. V. Carranza 2405
Col. Los Filtros
Apartado Postal 145
San Luis Potosí, S.L.P.
78210 México
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list