Learn R Programming

clogitboost (version 1.1)

predict.clogitboost: Predicting after fitting a boosting conditional logit model

Description

predict methods for the clogitboost objects, which produce marginal predictions of the covariate effects.

Usage

"predict"(object, x, strata, ...)

Arguments

object
output object from the clogitboost function.
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.

Value

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.

See Also

clogitboost

Examples

Run this code
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])

Run the code above in your browser using DataLab