[R] Time Series Issues, Stationarity ..
Uwe Ligges
ligges at statistik.uni-dortmund.de
Mon Nov 26 22:30:53 CET 2007
Ozcan Asilkan wrote:
> Hello,
>
> I am very new to R and Time Series. I need some help including R codes
> about the following issues. I' ll really appreciate any number of
> answers...
>
> # I have a time series data composed of 24 values:
> myinput = c(n1,n2...,n24);
> # In order to make a forecasting a, I use the following codes
> result1 = arima(ts(myinput),order = c(p,d,q),seasonal = list(order=c(P,D,Q)))
> result2 = forecast(result1,12)
> plot(result2)
>
> Now, by using R code...
>
> 1) How can I determine if my data is statitonary or not ? (trend &
> seasonal effects)
Look at the data and watch for different kinds of instationarity (or
better, if the assumptions for stationarity are fulfilled).
> 2) If not, how can I make it stationary ?
Depends on the kind of instationarity. "Making it stationary" might be
impossible for the whole time series.
> 3) Is arima() function used only on STATIONARY data ? Or does it first
> determine if the data is stationary or not and makes it stationary ?
> (if it is non-stationary)
No, R cannot think. It just does some calculations.
> 4) I tried different parameter values in arima() function, but every
> parameter gave very different results :(( . I
> even found & tried best.arima() function but it also gave
> unsatisfactory result. So, how can I calculate the optimum arima()
> parameters (p,d,q,P,D,Q) that fit my data best ?
You got to the right question. Unfortunately, we are all interested in
its answer. It depends on your definition on best and is not that easy.
You might want to start reading on the Box-Jenkins method to determine
parameters and continue to read a good textbook on time series analysis.
Or just ask the oracle.
Best,
Uwe Ligges
> Thanks in advance, best wishes..
>
> Ozzy
>
> ______________________________________________
> 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