Philip Turk
2003-Dec-24 18:28 UTC
[R] Solution to "Can anyone help me reproduce this SAS Mixed output??"
To those who might be interested -- following is the solution to my previous post regarding reproducing output from SAS Proc Mixed for a two-factor crossed random effects ANOVA model. I am graciously endebted to the kind replys from two statisticians for this solution whose names I will refrain from mentioning for the sake of privacy. I hope this helps someone?! -- Phil Turk> hw7 <- read.table("C:/My Documents/Phil/S412/hw7.txt", header = TRUE)> hw7mpg driver car obs 1 25.3 1 1 1 2 25.2 1 1 2 3 28.9 1 2 1 . . . . . . . . . . . . . . . 38 30.7 4 4 2 39 30.3 4 5 1 40 29.9 4 5 2> attach(hw7)> driver <- factor(driver)> car <- factor(car)> require(nlme)> const <- factor(rep(1,40))> hw7.lme <- lme(mpg~1, random=list(const=pdBlocked(list(~car-1,~driver-1,~car:driver-1),pdClass="pdIdent")))> VarCorr(hw7.lme)> intervals(hw7.lme)Phil Turk Department of ____________ Mathematical Sciences | | phone: (406)994-5357 2-235 Wilson Hall \ BZN, MT | FAX: (406)994-1789 Montana State University | *_______| Bozeman, MT 59717 \_| e-mail: turk at math.montana.edu