[R] How to fit ARMA model
bbolker at gmail.com
Fri Jul 1 15:16:45 CEST 2011
UnitRoot <akhussanov <at> gmail.com> writes:
> 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?
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"
More information about the R-help