@nitish29 wrote:
Hi as I am working on a project to forecast qty for next 6 months as well as next 30 days, I have daily data from 03-Jan-17 till 1-may-18. excluding sat and sun. what will be the best approach to plot Time series? I have attached sample data. data link https://drive.google.com/open?id=11TGbDhDw_2W-Hdy-5FibcW_GIXgo7WOM
Date QTY
1/3/2017 22
1/4/2017 354
1/5/2017 316
1/6/2017 299
1/9/2017 367
1/10/2017 200
1/11/2017 855
1/12/2017 1869
1/13/2017 1595
1/16/2017 510My approach
library(forecast)library(dplyr)
library(rvest)
library(tseries)
library(ggplot2)
setwd(“C:\Users\vaibhav\Downloads\R”)
data<-read.csv(“data1.csv”)
salests<-ts(data[,2],frequency=365)
stationary
diff1<-diff(salests)adf.test(diff1,alternative=“stationary”)
ggplot(data,aes(Date.Recd.Time,Lines)) + geom_line()
plot(diff1)
acf(diff1) #0,1
pacf(diff1)
auto.arima(diff1,seasonal = TRUE)
model1<-arima(diff1,order = c(1,0,3))
pred<-forecast(model1,30)
plot(pred)
checkresiduals(pred)
Posts: 2
Participants: 2