[R] How to fit ARMA model

Ben Bolker
2011-07-01T13:16:45Z

UnitRoot <akhussanov <at> gmail.com> writes:

>
> Hello,
> I am having some problems with fitting an ARMA model to my time series data
> (randomly generated numbers). The thing is I have tried many packages
> [tseries, fseries, FitARMA etc.] and all of them giving very different
> results. I would appreciate if someone could post here what the best
package
> is for my purpose.
> Also, after having done the fitting, I would like to check for the
model's
> adequacy. How can I do this?
> Thanks.

  It's hard to say without more detail -- we don't know what your
purpose is (beyond the general one of fitting an ARMA model to data).
I would say that when in doubt, if there is functionality in 'core' R --
the base and recommended packages -- that it is likely to be the most
stable and well tested.  (Not always true -- there are some very good
contributed packages, and sometimes the functions in R are missing
some advanced features -- but a good rule of thumb.)  So try ?arima.

 Another rule of thumb is that Venables and Ripley 2002 is a good
starting point (although again not necessarily as extensive as specialized
topics) for "how do I do xxx in R"?  See Chapter 14.

  As suggested in the help for ?arima, ?tsdiag is "a generic function
to plot time series diagnostics"