Advertisement
Guest User

Untitled

a guest
Aug 28th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. tz <- zoo(cbind(Y =TR_full, x = DateMth))
  2. tz[652:815, "Y"]<- NA
  3.  
  4. rr <- tz[1:652]
  5. rr<-cbind(`lag(Y, -1)` = lag(rr$Y, -1),rr)
  6.  
  7.  
  8. fit4 <- dyn$randomForest(Y ~ lag(Y,-1)+x, tz, na.action=na.omit)
  9.  
  10. fcast4 <- predict(fit4, newdata=rr)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement