marginal: Marginal utility for clogitboost objects

Description Usage Arguments Value Author(s) See Also Examples

View source: R/marginal.R

Description

marginal function for the clogitboost objects, which produces the marginal utility values of a covariate.

Usage

1
marginal(x, grid, d)

Arguments

x

output object from the clogitboost function.

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

clogitboost

Examples

1
2
3
4
5
6
7
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)

clogitboost documentation built on May 2, 2019, 6:28 a.m.