[R] Fwd: predictive interval in nlme

From: Cunningham Kerry <kerryrekky_at_yahoo.com>
Date: Fri 21 Oct 2005 - 07:43:06 EST


I sent out this message a couple of days ago. Yet received no reply.
There is a possibility that my description is not very clear or example is not highly specific. I am just wondering if anybody could point out (or have seen) a similar function that can do this job for lme model.
Thanks.
Note: forwarded message attached.                          


attached mail follows:


Subject: predictive interval in nlme
To: r-help <r-help@stat.math.ethz.ch>
MIME-Version: 1.0

Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Length: 702

Suppose I have the following data:

y x id
44 0 104
48 58 104
48 55 204
47 105 204
41 275 206
18 67 209
.......

I fit the model

>fit=lme(y~x+I(x^2),random=~1|id)

Now I want to make a prediction plot:

>time=seq(0,300,len=100)
>plot(predict(fit,data.frame(x=time),level=0))

Very fine. It gives me the prediction curve based on the model. My further request is to make a confidence bands around the curve. I guess I can derive its mathematical form analytically and implement it myself. But I just hope some experts can point out one simple way in R to avoid my redundant work.

Thanks!                          




R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Oct 21 09:06:35 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 19:14:58 EST