Displaying 2 results from an estimated 2 matches for "fm1pixel".
2006 Feb 08
2
lme syntax for P&B examples
...ecreate the examples below in lme4 syntax so I can
follow what is happening in the text I'd be grateful.
Cheers
Paul Cossens
#Pixel
# P&B(2000) p40-45
Pixel<-read.csv("Pixel.csv",header=TRUE);
Pixel$Side<-as.factor(Pixel$Side)
Pixel$Dog<-as.factor(Pixel$Dog)
(fm1Pixel <- lmer(pixel ~ day + I(day^2) +(day|Dog)+(1|Side), data =
Pixel))
(fm2Pixel <- lmer(pixel ~ day + I(day^2) +(day|Dog), data = Pixel))
(fm3Pixel <- lmer(pixel ~ day + I(day^2) +(1|Dog:Side), data = Pixel))
or should I do it this way?
Pixel$DS<-with(Pixel,Dog:Side)[drop=TRUE]
(fm3Pixel &...
2006 Sep 14
1
plotting all subgroups with augPred
All,
I have a question RE plotting the prediction lines of a random effects
model via augPred. I'll illustrate via the Pixel dataset within the
nlme package:
library(nlme)
attach(Pixel)
fm1Pixel = lme(pixel ~ day + I(day^2), data = Pixel, random = list(Dog =
~ 1))
plot(augPred(fm1Pixel)) ### 10 fitted lines since there are 10 dogs
fm2Pixel = update(fm1Pixel, . ~ . + Side)
plot(augPred(fm2Pixel)) ## also produces 10 fitted lines
For the second plot, shouldn't we have 2 fitted lin...