[R] Time Series Issues, Stationarity ..

John C Frain frainj at gmail.com
Thu Nov 29 15:42:13 CET 2007


Look at the R help files for predict.Arima rather than using forecast
to forecast an ARIMA model.  You might plot your data and the first
difference and you should be able to come to a conclusion about
stationarity.  With your very small data set you need a very
parsimonious model.  Knowledge about the nature of the data set would
also be important.  I see no seasonal effect in the data and wonder
why you are proposing to allow two seasonal differences.  Probably
some form of smoothing would be more suitable in your case.

Best Regards

John

On 29/11/2007, Ozcan Asilkan <oasilkan at gmail.com> wrote:
> Hi ohn,
>
> Thank you for your reply. I read in a few documents that if a Time Series
> data is NONStationary, ARIMA models must be used. So, if we suppose that my
> data is non-stationary, is it basically enough just to use the arima()
> function in R to make a future forecast ? Does arima function implicitly
> convert my data into stationary status by handling differencing, removing
> seasonality, etc. ? Or must I explicitly convert my data to stationary form
> in order to use arima() ?
>
> and here' s my code. I' ll appreciate your help making suggestions.. Thank
> you very much.
>
>  Best regards..
>  Ozzy
>
> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
> # Loading the library...
> library(forecast)
>
> # my input data having 3 years of monthly data (36 data)
> invec <-
> c(15289,14282,16153,15885,15369,15488,15462,14697,15512,15506,15271,15111,14963,15150,15061,14896,15147,14967,15026,15102,14880,15181,14979,15300,15377,15323,15462,15422,15598,15518,15497,15593,15348,15453,15361,15361)
>
> # converting to TS
> invecTS <- ts(invec, start = c(2005,1), frequency = 12)
>
> # using arima function
> invecTSAR = arima(invecTS, order = c(0,1,1), seasonal = list(order = c(0, 2,
> 0) ) )
>
> # making a further 2 years forecasting (=24 months)
> invecTSARPR <- forecast(invecTSAR,24)
>
> # and plotting
> plot(invecTSARPR,xlab="TIME", ylab="PRICE (€)", fcol="red",plot.conf=F)
>
> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
>
>
> On Nov 26, 2007 10:30 PM, Uwe Ligges
> <ligges at statistik.uni-dortmund.de> wrote:
> >
> >
> >
> > Ozcan Asilkan wrote:
> > > Hello,
> > >
> >

-- 
John C Frain
Trinity College Dublin
Dublin 2
Ireland
www.tcd.ie/Economics/staff/frainj/home.html
mailto:frainj at tcd.ie
mailto:frainj at gmail.com



More information about the R-help mailing list