marginal {clogitboost} | R Documentation |
Marginal utility for clogitboost objects
Description
marginal
function for the clogitboost
objects, which produces the marginal utility values of a covariate.
Usage
marginal(x, grid, d)
Arguments
x |
output object from the |
d |
integer indicating which covariate is used. |
grid |
grid of values for predicting the marginal utilities. |
Value
The method marginal
returns a vector of predicted marginal utilities based on the grid input.
Author(s)
Haolun Shi shl2003@connect.hku.hk
Guosheng Yin gyin@hku.hk
See Also
Examples
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)
[Package clogitboost version 1.1 Index]