Confidence Bands & Polynomial Regression

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Confidence Bands & Polynomial Regression

bamsel
Hello R experts,

Given a linear (in the parameters) regression model where one predictor x interacts with time and time*time (ie, a quadratic effect of time t):
y = b0 + b1(x) + b2(t) + b3(t^2) + b4(x*t) + b5(x*t^2) + e,

I would like to construct 95% confidence bands (optimally, shaded) around this function:

dy
--  = b1 + b4(t) + b5(t^2)
dx


That is, the partial effect of x on y changing over time t

Is this possible with predict() or perhaps another function?


Thank you very much
Ben

--
PhD Candidate
Center for Cognitive Science
University of Toronto