Displaying 2 results from an estimated 2 matches for "liver2".
Did you mean:
liver
2006 Aug 30
1
lmer applied to a wellknown (?) example
...nt + (1|Rat:Liver) + (1|Rat), data=rats)
summary(model2)
but then the random effects differs from model1.
Does the non-unique coding of rats and preparations in the original data
set mess things up? Do I need to recode the ids to unique levels...
rats$rat2 <- as.factor(rep(1:6, each=6))
rats$liver2 <- as.factor(rep(1:18, each=2))
str(rats)
...and then:
model3 <- lmer(Glycogen ~ Treatment + (1|liver2) + (1|rat2), data=rats)
# or maybe
model3 <- lmer(Glycogen ~ Treatment + (1|rat2:liver2) + (1|rat2), data=rats)
Can anyone help me to get this right! Thanks in advance!
P.S.
Thanks...
2006 Sep 03
2
Running cox models
..." and trying to run a cox test using
a dataset from:
http://faculty.washington.edu/~heagerty/Books/Biostatistics/chapter16.html
(Primary Biliary Cirrhosis data link at top of the page),
I'm using the following code:
--------------- start of code
library(survival)
liver <- scan("liver2.txt",list(age=0,albumin=0,alkphos=0,ascites=0,bili=0,
cholest=0,edema=0,edmadj=0,hepmeg=0,obstime=0,platelet=0,protime=0,
sex=0,sgot=0,spiders=0,stage=0,status=0,treatmnt=0,
triglyc=0,urinecu=0))
fit<-coxph(Surv(obstime,status)~bili+edmadj+albumin+protime+age,data=li...