[R] lme, groupedData, random intercept and slope

John Sorkin jsorkin at grecc.umaryland.edu
Fri Sep 10 14:25:44 CEST 2010


Windows Vista
R 2.10.1




Does the following use of groupedData and lme produce an analysis with both random intercept and slope, or only random slope?


zz<-groupedData(y~time |  Subject,data=data.frame(data),
              labels = list( x = "Time",
                y = "y" ),
              units = list( x = "(yr)", y = "(mm)")
)
plot(zz)

fit10<-lme(zz)
summary(fit10)

Linear mixed-effects model fit by REML
 Data: zz 
        AIC       BIC  logLik
  -123.1942 -115.2010 67.5971

Random effects:
 Formula: ~time | Subject
 Structure: General positive-definite
            StdDev       Corr  
(Intercept) 6.054897e+00 (Intr)
time        4.160662e-05 1     
Residual    9.775954e-04       

Fixed effects: y ~ time 
                Value Std.Error DF   t-value p-value
(Intercept) 15.000217  1.914727 19     7.834       0
time        -1.000051  0.000219 19 -4566.598       0
 Correlation: 
     (Intr)
time 0.059 

Standardized Within-Group Residuals:
        Min          Q1         Med          Q3         Max 
-1.73706837 -0.36289558  0.06892484  0.59777067  1.69095476 

Number of Observations: 30
Number of Groups: 10 


John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)

Confidentiality Statement:
This email message, including any attachments, is for th...{{dropped:6}}



More information about the R-help mailing list