Am trying to forecast using time series method called ARIMA. I have followed steps to build a time series model displayed in the code below. My challenge is on (Merging Actual and Forecast in One Series) and Remove Transformation from Series.

salesData<- read.csv("C:/Users/sales.csv")

#converting data into time series
salesData<-ts(salesData,start = 2010, frequency = 4)

# Checking for stationarity

# transforming data to stationary
diff_series <- diff(salesData)

## Augmented Dickey-Fuller Test for stationarity

# Arima forecasting auto generated, 1-step ahead
arimafore = forecast(auto.arima(salesData), h = 1)
autoplot(arimafore,xlab="years", ylab="sales")

#Final forecasting after removing difference(transformation)

My question is how do i best Merge Actual and Forecast in One Series and then'transform' the forecast data 'back' so I can plot it along with the original time-series using Differencing method ?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.