Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(b in 2:4){
- ###converting data to time series###
- TSTEST=ts(Test_Data_for_HW_CSV[b], f=52, s=2016+15/52)
- ###Time series is now fed to the HW algorithm ###
- HWTEST=HoltWinters(TSTEST)
- ###Forecast is now generated####
- PREDTEST=predict(HWTEST,52)
- ###Both HW's model and Forecast are plotted (this is only working for the last column in the loop)###
- plot(HWTEST,PREDTEST)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement