[R] regressor & autoregressive error?
Rakheon Kim
Rakheon.Kim.1 at cass.city.ac.uk
Sat Jul 7 17:01:26 CEST 2012
Hello,
I am using R for fitting parameters of a time series model.
The model is as below.
Y(t) = mu + a*X(t) + YN(t)
where YN(t) = b*YN(t-1) + innovation
and Z(t) follows N(0,1).
The main obstacle for me is the autoregressive error term, YN(t).
I can't figure out how to estimate the parameters (mu, a, b) with usual
'arima' function in R.
What I have tried is....
1. Do the regression of Y(t) to X(t) and obtain the residuals of the model.
2. use 'arima' function with zero intercept: arima(yn, order=c(1,0,0),
fixed=c(0,NA), method="CSS")
Intention is to obtain the estimation for b.
3. Y(t)** = (1 - b*L)*Y(t) , X(t)** = (1 - b*L)*X(t) ; L is the lag operator
Do the regression of Y(t)** to X(t)**.
This is expected to give the estimation for a.
4. multiply (1 - b) to the intercept of model obtained in step 3.
Intention is to obtain the estimation for mu.
However, this process does not provide the expected result (none of b,a and
mu).
The expected result is obtained by using least square method using Excel
VBA.
(The combination of parameters which minimize the sum of square errors)
I have used least squares method using Excel VBA to estimate the parameters
but it does not calculate the standard error for each parameters. I also
want the parameter estimation using MLE so I really want to do the fitting
using R.
Any help or comment would be much appreciated.
Regards,
--
View this message in context: http://r.789695.n4.nabble.com/regressor-autoregressive-error-tp4635719.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list