# Software for fitting generalized least squares model with errors that follow seasonal ARMA model

I need to fit a GLS model, with some known regressors, and where the errors follow an unknown ${\rm ARIMA}(1,0,1) \times (1,N,1)$ model. It seems like the main tool out there for such models is the gls function in the nlme package for R.

In gls, one specifies the correct correlation struction using a corStruct object, but I cannot find any corStruct objects for specifying my (really simple) seasonal model. I am new to R, so I don't think I am up for coding a new corStruct for my purposes. Are there any other packages out there for solving this problem? If not, can you point me to some references about how to create custom corStruct objects. Thanks for all your help!

-
 @nbrent I have written such a piece of software. It is called AUTOBOX and is available from autobox.com. – IrishStat Jun 10 '12 at 19:53

The arima() function in R will do what you want:

fit <- arima(y, xreg=x, order=c(1,0,1), seasonal=c(1,N,1))


where x is the matrix of regressors and y is the time series you wish to model.

-

You say you need "I need to fit a GLS model, with some known regressors, and where the errors follow an unknown ARIMA(1,0,1)x(1,N,1) model" . You want the software to optimally determine the appropriate ARIMA structure and not simply guess at it. In addition you want to be able to identify unspecified deterministic structure such as level shifts , seasonal pulses , local time trends and simple pulses. You also want to be able to determine what window of response is appropriate for each of your user suggested support variables i.e the polynomial distributed lag (PDL) , sometimes referred to as the ADL. This window of response could include lead, contemporaneous and/or lag effects . In addition you might need to test for constancy of parameters and constancy of error variance over time and incorporate software-recommended solutions .... all of which are fully disclosed. The software you are after is called AUTOBOX and is available from http://www.autobox.com. I am one of the developers of the software. They have a 30 day trial for a full working version which is available by contacting them. This free version can be used to actually solve your problem and/or to teach you how to duplicate it if you are so inclined .

-
 I should have specified that I know the seasonality, so I don't need that complicated of a solution. – nbren12 May 11 '12 at 17:32 You may know the seasonality based upon the interval between observations but you may or may not know the precise form of the possible seasonal ARIMA component i.e. differencing of order s ; ar of order s ; ma of of orders OR the possible need for seasonal dummies. – IrishStat May 11 '12 at 23:56