Guest User

Untitled

a guest
Aug 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. x <- Macro[1:13,3:21]
  2. x <- as.matrix(x)
  3. x
  4. y <- Macro[1:13,2:2]
  5. y <- as.matrix(y)
  6. y
  7.  
  8. ctrl2 = trainControl(
  9. method = "cv",
  10. number = 2,
  11. verboseIter = TRUE
  12. )
  13.  
  14. myfit <- caret::train(y ~ .,
  15. data = x,
  16. method = "lm",
  17. trControl = ctrl2)
  18.  
  19. Error in data[, all.vars(Terms), drop = FALSE] : subscript out of bounds
  20. In addition: Warning messages:
  21. 1: In predict.lm(modelFit, newdata) :
  22. prediction from a rank-deficient fit may be misleading
Add Comment
Please, Sign In to add comment