2013-08-24 67 views
0

我無法理解數據中似乎隱含的季節性。我認爲(雖然它只是一個猜測,它使用的是添加劑而不是乘法季節性)。我正在使用預測功能,並認爲它會根據Hyndman博士的演講自動選擇我需要的。下面的snipet代碼繪製了圖表,我預計預測會更高。我是否缺少模型參數?任何幫助,將不勝感激。R預測函數沒有考慮季節性

sw<-c(2280, 1754, 1667, 1359, 1285, 1379, 2166, 1053, 1076, 1149, 1277, 1577, 1639, 1719, 1592, 2306, 3075, 2897, 1875, 1966, 2927, 3528, 2948, 2890, 3947, 3913, 3885, 4148, 5293, 5752, 6001, 7719, 5512, 6782, 6320, 6425, 6406, 7237, 8655, 9269, 12447, 13470, 13469, 13949, 17753, 17653, 14531, 14496, 13643, 12652, 12665, 10629, 8962, 8198, 6833, 5027, 4407, 4449, 4399, 5896, 6589, 3786, 4386, 4847, 5597, 5407, 4800, 7803, 9255, 10423, 5523, 8121, 6944, 8434, 9847, 9292, 9794, 10195, 10124, 11310, 12245, 12798, 14611, 15402, 13532, 16154, 15101, 14755, 17139, 16475, 19935, 19980, 25173, 28568, 27839, 28991, 27073, 29615, 25849, 27910, 27067, 21303, 20544, 15188, 13706, 9277, 10815, 7228, 4608, 4409, 9866, 8471, 8223, 6445, 6641, 6833, 11421, 8945, 8127, 10380, 12005, 13272, 9431, 12144, 14934, 14052, 11712, 14888, 15824, 17275, 18067, 19839, 21192, 22763, 22976, 23721, 22681, 20131, 19965, 20539, 19517, 22022, 23076, 30574, 40247, 43111, 39577, 40724, 44982, 44388, 46372, 43153, 36821, 32258, 31256, 27153, 23180, 18252, 16381, 13220, 12500, 10727, 9636, 8892, 8644, 9482, 9170, 10937, 12299, 15781, 11477, 16524, 16752, 18072, 14776, 13388, 18056, 19815, 21263, 22046, 26415, 24247, 25403, 30058, 26331, 32533, 31891, 35973, 27558, 24554, 25692, 25955, 24284, 24930, 28354, 34840, 40055, 42099, 42768, 48279, 50086, 56466, 42244, 51451, 44583, 39091, 33391, 29452, 25533) 

swts <- ts(sw, frequency=52, start=c(2006,30)) 

swfc <- forecast(swts,h=52) 

plot(swfc) 

回答

2

您的數據是否有多個季節?如果是這樣,你可以檢查tbats功能。

無論如何,您的季節性週期大於12,因此預測正在使用stl分解來調整您的季節性數據。也許你想檢查?stlf關於哪些參數可以改變,或者嘗試一個BoxCox轉換的更多信息:

lambda <- BoxCox.lambda(sw) 
swfc <- forecast(swts,h=52, lambda = lambda, robust = TRUE) 
plot(swfc) 

enter image description here