marginal {clogitboost} | R Documentation |
marginal
function for the clogitboost
objects, which produces the marginal utility values of a covariate.
marginal(x, grid, d)
x |
output object from the |
d |
integer indicating which covariate is used. |
grid |
grid of values for predicting the marginal utilities. |
The method marginal
returns a vector of predicted marginal utilities based on the grid input.
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) marginal(fit, grid = seq(0, 10, by = 1), d = 1)