[R] Solution to "Can anyone help me reproduce this SAS Mixed output??"

About this list Date view Thread view Subject view Author view Attachment view

From: Philip Turk (turk@math.montana.edu)
Date: Thu 25 Dec 2003 - 05:28:19 EST


Message-id: <Pine.GSO.4.44.0312241113400.19902-100000@newton1.math.montana.edu>

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)

> hw7

    mpg 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@math.montana.edu

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Thu 01 Jan 2004 - 09:21:00 EST