私は、営業時間ごとに時系列的に行動します。私はデータを日ごとに持っています。 (01.11.2015-29.11.2015のフォーマット)。ここに例:日常のやり方
dput
DAY STORE ART SALES
01.11.2015 1534 343533 62.5000
01.11.2015 25039 20490 686.4480
01.11.2015 1612 295206 185.0000
01.11.2015 1053 16406274 32.5000
01.11.2015 1612 49495 143.1196
01.11.2015 961 15309949 50.9000
すべてのお店やARTの予測をどのように行うのですか?私の分析を2つの要素に分割する方法は?
#library('ggplot2')
library('forecast')
library('tseries')
mydat=read.csv("C:/Users/synthex/Downloads/sales.csv", sep=";",dec=",")
View(mydat)
str(mydat)
count_ts = ts(mydat[, c('SALES')])
View(count_ts)
mydat$clean_cnt = tsclean(count_ts)
mydat$cnt_ma = ma(mydat$clean_cnt, order=7) # using the clean count with no outliers
mydat$cnt_ma30 = ma(mydat$clean_cnt, order=30)
count_ma = ts(na.omit(mydat$cnt_ma), frequency=30)
decomp = stl(count_ma, s.window="periodic")
deseasonal_cnt <- seasadj(decomp)
plot(decomp)
adf.test(count_ma, alternative = "stationary")
auto.arima(deseasonal_cnt, seasonal=FALSE)
fit<-auto.arima(deseasonal_cnt, seasonal=FALSE)
tsdisplay(residuals(fit), lag.max=45, main='(1,1,0) Model Residuals')
fit2 = arima(deseasonal_cnt, order=c(1,1,7))
fcast <- forecast(fit2, h=1)
((あなたは私を助けることができる私は時計がRでの日々の時系列を開始した後、私の質問を編集しますが、forecactは変だった? –
ここでデータの.csv https://www.sendspace.com/file/m5wa4q it; s 30日01-11-2015から29-11-2015、30-11-2015の売上高を予測する必要があります。ほぼ830 000 obs –
ありがとうございます。すべてのお店やARTの予測を行うには、私の分析を2つの要素に分割する方法/私は私の記事を編集しました) –