Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x <- Macro[1:13,3:21]
- x <- as.matrix(x)
- x
- y <- Macro[1:13,2:2]
- y <- as.matrix(y)
- y
- ctrl2 = trainControl(
- method = "cv",
- number = 2,
- verboseIter = TRUE
- )
- myfit <- caret::train(y ~ .,
- data = x,
- method = "lm",
- trControl = ctrl2)
- Error in data[, all.vars(Terms), drop = FALSE] : subscript out of bounds
- In addition: Warning messages:
- 1: In predict.lm(modelFit, newdata) :
- prediction from a rank-deficient fit may be misleading
Add Comment
Please, Sign In to add comment