0

There are two models fitted with lemr(). The homework ask me to compare them graphically and numerically. I just don't know how to fix it besides comparing the AIC, fix effect and random effect of these two models.

the first model:

child.mutil<-lmer(HIV$CD4PCT~HIV$time1+(1|HIV$newpid))

the second model:

child.mutil2<-lmer(HIV2$CD4PCT~HIV2$time1+treatment.group+visage.group+(1|HIV2$newpid))
Vincent Bonhomme
  • 7,235
  • 2
  • 27
  • 38
Jacob Yao
  • 9
  • 2
  • Have you tried `plot(ranef(MYLMER))`? This gives you a qqplot of the random effect as a start (against Gaussian assumption). Another suggestion is for you to provide [a minimal working example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) of your data, e.g. using `dput(head(MYDATA))`. This makes it much easier to help you. – Therkel Jun 05 '16 at 21:06
  • Thank you for your response. I havn't tried this plot code yet. the data example is: `dput(head(H:/software/RStudio/files/allvar.csv))` – Jacob Yao Jun 06 '16 at 08:19
  • I have tried `plot(ranef(child.mutil), xlim=c(0.6,4), ylim=y.range, xlab="Newpid", ylab="percentage", cex.lab=1.2, cex.axis=1.1, pch=20, mgp=c(2,.7,0), xaxt="n", yaxt="n", cex.main=1, main=id[j]);` , but it just shows the relationship between newid and CD4 percentage rather than the relationship between independent varibles and dependent varible. – Jacob Yao Jun 06 '16 at 08:49
  • I do not have access to your H drive. :) You need to **run** that dput code in your R and paste the output into your question. – Therkel Jun 06 '16 at 09:05
  • This question is [off-topic](http://stackoverflow.com/help/on-topic): *Questions asking for homework help must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it.* – alexwhitworth Jun 07 '16 at 04:36

0 Answers0