[R] Random intercept model with time-dependent covariates, results different from SAS [SUMMARY]

Keith Wong keithw at galen.med.usyd.edu.au
Fri Jul 16 06:14:40 CEST 2004

Thank you Prof Ripley and Dr Bebber for the helpful responses to my post on 
4 July 2004, and references to further reading.

To close the thread, I summarize the answer to my question. The different 
results between SAS and R arose from more than one cause.

1. SAS incorrectly assumed that Group was a within-subjects effect: as seen 
in the difference in denominator degrees of freedom..

2. The two between subjects levels of Group contained unequal numbers of 

3. R reports type I sums of squares with the anova() function on an lme 
object, whereas type III sums of squares are the default in SAS PROC MIXED. 
Placing the variable time last in the model in R resulted in a p-value 
similar to that given in SAS. I accept Prof Ripley's point that this main 
effect is not very relevant in the presence of a significant interaction 
between time and group.

Thank you again to the list.

Keith Wong

More information about the R-help mailing list