
Hi R Users,

 

I'm fairly new to R (about 3 months use thus far.)

I wanting to use the arimax function from the TSA library to incorporate some exogenous inputs into the basic underllying arima  model.Then with that newly model of type arimax, I would like to make a prediction.

 

To avoid being bogged down with issues specific to my own work, I would like to refer to readers to the example given in the TSA documentation which would also then clarify my own issues:

 

>library(TSA)

>

>data(airmiles)

>air.ml=arimax(log(airmiles),order=c(0,1,1),seasonal=list(order=c(0,1,1),

>period=12),xtransf=data.frame(I911=1*(seq(airmiles)==69),

>I911=1*(seq(airmiles)==69)),

>transfer=list(c(0,0),c(1,0)),xreg=data.frame(Dec96=1*(seq(airmiles)==12),

>Jan97=1*(seq(airmiles)==13),Dec02=1*(seq(airmiles)==84)),method='ML')

 

Ok,so I've run the above code and an object called air.ml has now been created of class type arimax.According to the documentation this is the same type as arima.So now I make a prediction,say 15 time steps ahead:

 

>forecast=predict(air.m1, n.ahead=15)

 

The following error is produced:

 

Error in predict.Arima(air.m1, n.ahead = 15) : 
  'xreg' and 'newxreg' have different numbers of columns
--------------------------------------------------------------------------------------------------------------------

Question is how to to get a prediction correctly using predict.(I've seen DSE package but that seems overkill to make just a simple prediction)??



Thank you in advance for any repsonses.



A.A

Part time student at BBK college,UofL.






 		 	   		  
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.

N:WL:en-US:WM_HMP:042010_2
	[[alternative HTML version deleted]]

