Skip to content
Prev 69120 / 398502 Next

lme versus proc mixed in SAS

check this:

library(nlme)
B <- 1000
N <- 100
n <- 5
x <- rep(runif(N, -4, 4), each=n)
gr <- rep(1:N, each=n)
####################
T <- numeric(B)
for(i in 1:B){
    y <- rnorm(N*n, 1 + 1.5*x)
    L0 <- lm(y~x)
    L1 <- lme(y~x, random=~1|gr, method="ML")
    T[i] <- anova(L1, L0)$L.Ratio[2]
}
hist(T, prob=TRUE, breaks=100)


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm



----- Original Message ----- 
From: "Beatrijs Moerkerke" <Beatrijs.Moerkerke at UGent.be>
To: <r-help at stat.math.ethz.ch>
Sent: Wednesday, May 04, 2005 12:03 PM
Subject: [R] lme versus proc mixed in SAS