[R-SIG-Finance] ARIMA question
Nathan Bryant
nbryant at optonline.net
Wed Nov 7 22:07:34 CET 2007
There is a method called "fitted()" that applies to most model classes
including Arima, which does the same thing.
Jeff Ryan wrote:
> I think it is as simple as backing out from the residuals:
>
> # an MA2 model
> x <- arima.sim(list(ma=2),n=100)
>
> #Fitted as such...
> x.model <- arima(x,c(0,0,2))
>
> # add the residuals to the original data
> x.insample.fit <- x-residuals(x.model)
>
> # and you can even see them:
> plot(x)
> par(new=TRUE)
> lines(x.insample.fit,col=3,lty=2)
>
> Jeff
>
>
> On Nov 7, 2007 12:47 PM, Yalla, Swaroop (FID)
> <Swaroop.Yalla at morganstanley.com> wrote:
>
>> Hi:
>>
>> I have another ARIMA question for R. I was finally able to use ARIMA
>> modeling on my data. Now to forecast out of sample, we can use
>> predict(fit, n.ahead = 10) type of command and thats fine- but how can I
>> see the fit in-sample. I mean is there a easy way to just compare the
>> actual data with the fitted model in-sample?
>>
>> thanks for all the help..
>> Swaroop
>> --------------------------------------------------------
>>
>> This is not an offer (or solicitation of an offer) to bu...{{dropped:24}}
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
>>
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
>
More information about the R-SIG-Finance
mailing list