Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. for(b in 2:4){
  2. ###converting data to time series###
  3. TSTEST=ts(Test_Data_for_HW_CSV[b], f=52, s=2016+15/52)
  4.  
  5. ###Time series is now fed to the HW algorithm ###
  6. HWTEST=HoltWinters(TSTEST)
  7.  
  8. ###Forecast is now generated####
  9. PREDTEST=predict(HWTEST,52)
  10.  
  11. ###Both HW's model and Forecast are plotted (this is only working for the last column in the loop)###
  12. plot(HWTEST,PREDTEST)
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement