[R] [?] ARIMA in R
Adrian Trapletti
Adrian.Trapletti at wu-wien.ac.at
Mon May 22 15:06:28 CEST 2000
Francisco Cribari wrote:
> I am using R version 1.0.1 both under Linux and Windows 98.
>
> A simple question: After fitting an ARIMA model, how can I
> plot in the same graph both the original series (solid line,
> say) and the fitted values implied by the estimated model
> (dotted line, say)?
>
> Example:
>
> library(ts)
> data(LakeHuron)
> arima0(LakeHuron, order=c(2,0,0), xreg=1:98)
What about
md <- arima0(LakeHuron, order=c(2,0,0), xreg=1:98)
plot(LakeHuron)
lines(LakeHuron-md$resid,col="red")
Adrian
--
Adrian Trapletti, Vienna University of Economics and Business Ad-
ministration, Operations Research, Augasse 2-6, 1090 Vienna, Austria
Phone: ++43-(0)1-31336-4561 Email: adrian.trapletti at wu-wien.ac.at
Fax: ++43-(0)1-31336-708 WWW: http://quor.wu-wien.ac.at/adrian.html
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list