[R] Please Help!

R. Michael Weylandt michael.weylandt at gmail.com
Tue Jan 31 14:49:12 CET 2012


arima is one of the largest R functions and not an easy one to
explain, but you can see its source simply by typing arima with no
parentheses at the prompt. To get the C functions that are called,
look here: https://svn.r-project.org/R/trunk/src/library/stats/src/

You might also check the references given in ?arima.

Hope this gets you started,

Michael

On Tue, Jan 31, 2012 at 2:25 AM, Li Liu <sjtuliuli at gmail.com> wrote:
> Dear Professor:
>
> I am a learner on R.
>
> I met a problem when I use the function arima in R.
>
> I wish you could give me a hand.
>
> The following is the code I wrote.
>
>> set.seed(1)
>
>> b <- c(0.8)
>
>> x <- w <- rnorm(1000)
>
>> for (t in 2:1000) {
>
>     x[t] <- x[t] + b * w[t - 1]
>
>  }
>
>> x.ma <- arima(x, order = c(0, 0, 1))
>
>> x.ma$res
>
>
> Could you please tell me how x.ma$res is calculated in R?
>
>
> The results in R is a little different from the ones I calculated by hand.
>
>
> Is there any where I could see the relavent code?
>
>
> Thank you!
>
>
> Best Regards!
>
>
> Li Liu
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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