Dear R group,

Tried to turn off the html in yahoo.  So far  not successful.  Apologies!

I tried to get xyplot shrink fit for my mixed model.  But, the mixed model line 
is not seen in the graph.
I would like to know if there is anything wrong with my code.
Thanks,
A.K.



(fm1 <- lmer(Response3 ~1+ Wavelength*Start_Resp*time + (1|resid) + 
(1+time|Subject_BDat), family=binomial, 
data=Behavdat, REML=0))

df <- coef(lmList(Response ~ time | SubjectBDat, Behavdat)) 
fclow <- subset(df, '(Intercept)' < -4.1) 
fchigh <- subset(df, '(Intercept)' > -4.1) 
cc1 <- as.data.frame(coef(fm1)$Subject) 
names(cc1) <- c("A", "B","C","D","E","F","G","H","I","K","L","M") 
df <- cbind(df, cc1) 
ff <- fixef(fm1)
SubjectBDat<-as.factor(Behavdat$Subject)
print(xyplot(Response ~ time | SubjectBDat, Behavdat, 
              type = c("g", "p", "r"), 
             coef.list = df[,3:14], 
             panel = function(..., coef.list) { 
                 panel.xyplot(...) 
                 panel.abline(as.numeric(coef.list[packet.number(),]), 
                              col.line = 
trellis.par.get("superpose.line")$col[2], 
                              lty = trellis.par.get("superpose.line")$lty[2] 
                              ) 
                 panel.abline(fixef(fm), 
                              col.line = 
trellis.par.get("superpose.line")$col[4], 
                              lty = trellis.par.get("superpose.line")$lty[4] 
                              ) 
             }, 
             index.cond = function(x,y) coef(lm(y ~ x))[1], 
             xlab = "time", 
             ylab = "Response", 
             key = list(space = "top", columns = 3, 
             text = list(c("Within-subject", "Mixed model", "Population")), 
             lines = list(col = 
trellis.par.get("superpose.line")$col[c(1:2,4)], 
             lty = trellis.par.get("superpose.line")$lty[c(1:2,4)]))))
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to