shakthydoss
shakthydoss

Reputation: 2631

R Time Series Analysis forecast result always remains same

I am trying to do time series analysis in R. I have data time series data set like this.

    Month       Year    Value 
    December    2013    5300
    January     2014    289329.8
    February    2014    596518
    March       2014    328457
    April       2014    459600
    May         2014    391356
    June        2014    406288
    July        2014    644339
    August      2014    251238
    September   2014    386466.5
    October     2014    459792
    November    2014    641724
    December    2014    399831
    January     2015    210759
    February    2015    121690
    March       2015    280070
    April       2015    41336

Googling I found I can use auto.arima function to forecast the result. I managed to write R code to do forecast using auto.arima function

    data <- c(5300,289329.8,596518,328457,459600,391356,406288,644339,251238,386466.5,459792,641724,399831,210759,121690,280070,41336)
    data.ts <- ts(data, start=c(2013, 12), end=c(2015, 4), frequency=12) 
    plot(data.ts)
    fit <- auto.arima(data.ts)
    forec <- forecast(fit)
    plot(forec)

Problem is my forecast result always remain same.

enter image description here

Could any tell me what is going wrong. or help me to correct my forecast result. Thanks

Upvotes: 4

Views: 511

Answers (1)

J.R.
J.R.

Reputation: 3878

Nothing is wrong. This simply is your automated forecast: A model only containing a intercept (mean).

You only have 17 obs., and with a (possible) low signal-to-noise ratio it will be hard to extract any possible trend, persistence, lagged errors etc. Also it is impossible to capture seasonality related to cycles with higher periods (like annual seasonality), when you only have such a short observed series.

Upvotes: 2

Related Questions