set.seed(33)
pig=as.factor(rep(1:10,rep(8,10)))
times=as.factor(rep(1:8,10))
group=rep(0:1,rep(5*8,2))
effect.pig=rep(rnorm(10,sd=0.5),rep(8,10))
effect.times=rep(c(0,0,0,0,2,2,2,2),10)
y=rnorm(8*10,2*group)+effect.pig+effect.times*group
fit1=lme(y~group*times,random=~1|pig)
aov1=aov(y~group*times+Error(pig/times))
print(summary(aov1))
print(anova(fit1))
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
library(lsmeans)
fit2=lmer(y~group*times+(1|pig))
comp1= lsmeans(fit2, ~ group | times, cov.reduce = FALSE)
diff1 <- update(pairs(comp1, by = "times"), by = NULL)
print(diff1)
cld(diff1)
mcomp1=as.glht(update(pairs(comp1)),test = adjusted("Shaffer"))
comp2= lsmeans(fit2, ~ times| group , cov.reduce = FALSE)
diff2 <- update(pairs(comp2, by = "times"), by = NULL)
mcomp2=as.glht(update(pairs(comp2,by="times")),test = adjusted("Shaffer"))
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.