[R] need 95% confidence interval bands on cubic extrapolation

2005-12-20 Thread James Salsman
Dear R experts: I need to get this plot, but also with 95% confidence interval bands: hour <- c(1, 2, 3, 4, 5, 6) millivolts <- c(3.5, 5, 7.5, 13, 40, 58) plot(hour, millivolts, xlim=c(1,10), ylim=c(0,1000)) pm <- lm(millivolts ~ poly(hour, 3)) curve(predict(pm, data.frame(hour=

Re: [R] need 95% confidence interval bands on cubic extrapolation

2005-12-20 Thread Liaw, Andy
Look at the "interval" option in ?predict.lm. Andy From: James Salsman > > Dear R experts: > > I need to get this plot, but also with 95% confidence interval bands: > >hour <- c(1, 2, 3, 4, 5, 6) >millivolts <- c(3.5, 5, 7.5, 13, 40, 58) > >plot(hour, millivolts, xlim=c(1,10), yli

Re: [R] need 95% confidence interval bands on cubic extrapolation

2005-12-20 Thread Marc Schwartz (via MN)
On Tue, 2005-12-20 at 13:04 -0800, James Salsman wrote: > Dear R experts: > > I need to get this plot, but also with 95% confidence interval bands: > >hour <- c(1, 2, 3, 4, 5, 6) >millivolts <- c(3.5, 5, 7.5, 13, 40, 58) > >plot(hour, millivolts, xlim=c(1,10), ylim=c(0,1000)) > >