predict.clogitboost {clogitboost} | R Documentation |
predict
methods for the clogitboost
objects, which produce marginal predictions of the covariate effects.
## S3 method for class 'clogitboost' predict(object, x, strata, ...)
object |
output object from the |
x |
new matrix or data frame with each column being a covariate. |
strata |
new vector of group memberships, i.e., items in the same group have the same value. |
... |
not currently used. |
The method predict
returns the following list of values:
prob |
probability of the outcome equal to 1. |
utility |
predicted utility. |
prediction |
0-1 prediction of the outcome variable. |
Haolun Shi shl2003@connect.hku.hk
Guosheng Yin gyin@hku.hk
data(travel) train <- 1:504 y <- travel$MODE[train] x <- travel[train, 3:6] strata <- travel$Group[train] fit <- clogitboost(y = y, x = x, strata = strata, iter = 10, rho = 0.05) predict(fit, x = travel[-train, 3:6], strata = travel$Group[-train])