Description Usage Arguments Value Examples
Predict function for bigKRLS object. crossvalidate.bigKRLS() provides additional functionality.
1 2 3 |
object |
bigKRLS output |
newdata |
New data. Columns in newdata should be ordered identically to columns in X. |
se.pred |
Calculate standard errors on predictions? |
correct_SE |
If se.pred == TRUE, default is to use Neffective (if available) rather than model N in calculating uncertainty of predictions. |
ytest |
Provide testing data to have it returned with the object. Optional. To automatically generate out-of-sample test statistics, use crossvalidate.bigKRLS() instead. |
... |
ignore |
Returns bigKRLS_predicted list object.
1 2 3 4 5 6 7 8 9 10 11 12 |
# set.seed(123)
# y <- as.matrix(ChickWeight$weight)
# X <- matrix(cbind(ChickWeight$Time, ChickWeight$Diet == 1), ncol = 2)
# N <- length(y)
# train <- sample(N, 100, replace = FALSE)
# outOfSample <- c(1:N)[-train]
# test <- sample(outOfSample, 10, replace = FALSE)
# fit <- bigKRLS(y[train], X[train,], instructions = FALSE)
# p <- predict(fit, X[test,])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.