achronal at securenym.net
2008-Feb-06 16:05 UTC
[R] Regression with time-dependent coefficients
Hi, I was wondering if someone might be willing to indulge a question about R and the estimation of a linear regression with time-varying coefficients. The model I am trying to estimate is of the form: y(t) = beta(t) * x(t) + v(t) beta(t) = gamma * beta(t-1) + w(t) where gamma is a constant, v(t) and w(t) are Gaussian innovations, and where y(t) and x(t) are univariate time series that are known. I would like to estimate gamma and the variance of v(t) and w(t). I have tried using the following packages with no success: sspir, dse (specifically dse1) and dlm. In each case, any attempt to specify the above model meets with some sort of error. Hence, I have not been able to estimate the model. I am using "manufactured" data, i.e., I assume a value for gamma, beta(0), and values for the variances of v(t) and w(t), so I know what result I should attain. I would really appreciate any help on how to appropriately specify the above model in any of the packages I mentioned. Best regards, -Paul
There's an example in our text: http://www.stat.pitt.edu/stoffer/tsa2 Time Series Analysis and Its Applications ... it's Example 6.12, Stochastic Regression. The example is about bootstrapping state space models, but MLE is part of the example. The code for the example is on the page for the book... click on "R Code (Ch 6)" on the blue bar at the top. When you get to the Chapter 6 code page, scroll down to "Code to duplicate Example 6.12 [?6.7]". -- View this message in context: http://www.nabble.com/Regression-with-time-dependent-coefficients-tp15315302p15404399.html Sent from the R help mailing list archive at Nabble.com.