CSVS {TBFmultinomial}R Documentation

Cause-specific variable selection (CSVS)

Description

This function performs CSVS given a model fitted using the multinom() function of the nnet package or the vglm() function of the VGAM package.

Usage

CSVS(g, model, discreteSurv = TRUE, nbIntercepts = NULL, package = "nnet")

Arguments

g

the estimated g, must be fixed to one value

model

the model fitted using either nnet or VGAM

discreteSurv

Boolean variable telling us whether a 'simple' multinomial regression is looked for or if the goal is a discrete survival-time model for multiple modes of failure is needed.

nbIntercepts

how many cause-specific intercepts are there? they

package

Which package has been used to fit the model, nnet or VGAM?

Author(s)

Rachel Heyard

Examples

# data extraction:
data("VAP_data")

# the definition of the full model with three potential predictors:
FULL <- outcome ~ ns(day, df = 4) + gender + type + SOFA
# here the define time as a spline with 3 knots

# we first need to fit the multinomial model:
model_full <- multinom(formula = FULL, data = VAP_data,
                       maxit = 150, trace = FALSE)

G <- 9 # let's suppose g equals to nine

# then we proceed to CSVS
CSVS_nnet <- CSVS(g = G, model = model_full,
                  discreteSurv = TRUE, package = 'nnet')

[Package TBFmultinomial version 0.1.3 Index]