Nile Dataset

AirPassengers Dataset (Part2)

AirPassengersts = ts(AirPassengers, start=1, frequency=25) 
summary(AirPassengersts)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   104.0   180.0   265.5   280.3   360.5   622.0
plot(AirPassengersts)

HoltWinters

AirPassengershw = HoltWinters(AirPassengersts, gamma = TRUE) 
summary(AirPassengershw)
##              Length Class  Mode     
## fitted       476    mts    numeric  
## x            144    ts     numeric  
## alpha          1    -none- numeric  
## beta           1    -none- numeric  
## gamma          1    -none- logical  
## coefficients  27    -none- numeric  
## seasonal       1    -none- character
## SSE            1    -none- numeric  
## call           3    -none- call
plot(AirPassengershw)

Predicting the trend in next 10 years

AirPassengersp = predict(AirPassengershw, n.ahead=10) 
ts.plot(AirPassengersts, AirPassengersp)

EuStockMarkets Dataset (8 year frequnecy, considering the economic booms and busts cycle - Part 3)

eus = EuStockMarkets[,4.]
EuStockMarketsts = ts(eus, start=1, frequency=8) 
summary(EuStockMarketsts)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    2281    2843    3247    3566    3994    6179
plot(EuStockMarketsts)

EuStockMarketshw = HoltWinters(EuStockMarketsts, gamma = FALSE) 
summary(EuStockMarketshw)
##              Length Class  Mode     
## fitted       5574   mts    numeric  
## x            1860   ts     numeric  
## alpha           1   -none- numeric  
## beta            1   -none- numeric  
## gamma           1   -none- logical  
## coefficients    2   -none- numeric  
## seasonal        1   -none- character
## SSE             1   -none- numeric  
## call            3   -none- call
plot(EuStockMarketshw)

Predict next 8 years

EuStockMarketsp = predict(EuStockMarketshw, n.ahead=8) 
ts.plot(EuStockMarketsts, EuStockMarketsp)