Re: [R] arima and xreg

2008-09-12 Thread Jose Capco
Thats nice thanks =) .. I can trick R to do multivariate armax with lagged inputs as well and I bet R people didnt designed it that way (but the idea is the same when doing MLE, it must work).. anyway.. I wrote a small code (you can change it if you want) that does armax with multiple inputs in ma

Re: [R] arima and xreg

2008-09-11 Thread David Stoffer
You can have lagged inputs in the xreg statement, you just have to construct the input matrix properly so the dimensions are the same, e.g., x = ts.intersect(mort, trend, part, lag(part,-4)) arima(x[,1],order=c(2,0,1), xreg=x[,2:4]) ... and yes you have to worry about singularities or even multi

Re: [R] arima and xreg

2008-09-11 Thread Jose Capco
On Sep 11, 6:24 am, David Stoffer <[EMAIL PROTECTED]> wrote: > Your model is close, but not correct... there are no t's on the parameters > and the U's aren't lagged. > > You can find an ARMAX example on our "quick fix" > page:http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm. T

Re: [R] arima and xreg

2008-09-10 Thread David Stoffer
Your model is close, but not correct... there are no t's on the parameters and the U's aren't lagged. You can find an ARMAX example on our "quick fix" page: http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm . The example is near the bottom and just above the spectral analysis e

[R] arima and xreg

2008-09-10 Thread Jose Capco
Dear R-help-archive.. I am trying to figure out how to make arima prediction when I have a process involving multivariate time series input, and one output time series (output is to be predicted) .. (thus strictly speaking its an ARMAX process). I know that the arima function of R was not designe