[R-sig-eco] plot confidence intervals of a line from a mixed model

Rob Knell r.knell at qmul.ac.uk
Tue Sep 6 15:21:58 CEST 2011


Hello everyone

I'm afraid this is probably a very dumb question, but I have ended up totally stumped in trying to do this. I have a mixed model fitted to some data using lme, including a fixed effect that is an interaction term between a factor (maternal treatment) with two levels and a continuous variable (weight). I'd like to plot a graph showing the two fitted lines plus their confidence intervals. How do I get the confidence intervals? I can get the standard error of the difference between the two slopes from summary(model), but that's not what I want. I can get the confidence intervals for the difference between the slopes with intervals(model) but again that is for the difference between the slopes. I tried using predict(model,…,int="c") but the int="c" call doesn't seem to work with an lme object. Any suggestions gratefully received.

Rob K


More information about the R-sig-ecology mailing list