[R] fMultivar OLS - how to do dynamic regression?
spencer.graves at pdf.com
Sun Aug 20 08:20:21 CEST 2006
The documentation for 'OLS' says that it is a wrapper for 'lm';
if you type 'OLS' at a command prompt, you will see that it does little
more than calling 'lm' and returning the output.
An example of 'dynamic regression' appears in the example section
of the help page for 'arima'. Other example can be found in Sect. 14.5
of Venables and Ripley (2002) Modern Applied Statistics with S
(Springer). If you haven't already, I suggest you get a copy of this
book and work through ch. 14, aided by 'ch14.R' in folder
'~library\MASS\scripts' of your R installation directory. It shows how
to use both 'gls' in the 'nlme' package and 'arima' for this kind of
If after this you would like further help from this listserve,
please submit another post. When you do, however, I encourage you to
include commented, minimal, self-contained, reproducible code to help
illustrate your question and something you've tried that did not seem
satisfactory, as suggested in the posting guide
"www.R-project.org/posting-guide.html". I'm confident that people who
include such examples with a carefully written question tend get more
helpful replies sooner.
Hope this helps.
Kerpel, John wrote:
> Hi folks!
> Does anybody know how to use the OLS function in fMultivar to do dynamic
> regression? I've tried specifying lags in OLS using a data series
> created in fSeries and it doesn't seem to work. I've done dynamic
> regression using dyn$lm and I was wondering how to accomplish the same
> thing using the OLS function from fMultivar. Thanks!
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
> 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