[R] ARMA(1,1) for panel data
Spencer Graves
spencer.graves at pdf.com
Fri Aug 18 11:42:10 CEST 2006
For "normal" panel data, the standard R tool is the nlme package,
documented in Pinheiro and Bates (2000) Mixed-Effects Models for S and
S-Plus (Springer). See the examples in ?corARMA.
I recommend you spend some quality time with Pinheiro and Bates
(2000). If you do that, I suggest you start by looking at "ch01.R",
"ch02.R", ..., "ch06.R", "ch08.R" in "~library\nlme\scripts" in your R
installation directory. These files contain the R commands used in Ch.
1, Ch. 2, etc., of that book. Using them makes studying that book
easier, more pleasant and productive for several reasons. First, they
save you the work of typing in the commands yourself. Second, they save
you the agony of wondering why you didn't get their answer when you have
a typographical error. Third, there are a very few subtle syntax
changes between the book and R that generate different answers for the
unwary. Fourth, you can experiment with different alternatives to test
your understanding, etc.
If your data required non-normal models, I would recommend 'lmer'
associated with the 'lme4' package. However, that's newer and does not
have the same level of documentation, helper functions, etc.
Hope this helps.
Spencer Graves
Tom Boonen wrote:
> Dear List,
>
> I am new to TS-Modeling in R. I would like to fit an ARMA(1,1) model
> for a balanced panel, running Y on a full set of unit and year dummies
> using an arma(1,1) for the disturbance:
>
> y_it=unit.dummies+yeardummies+e_it
>
> where: e_it=d*e_it-1+u_it+q*u_it-1
>
> How can I fit this model in R? arma() does not seem to take covariates
> (or I don't understand how to specify the function so that it would).
> Thank you very much.
>
> Best, Tom
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list