# CSVS: Cause-specific variable selection (CSVS) In TBFmultinomial: TBF Methodology Extension for Multinomial Outcomes

## 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

 `1` ```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`?

Rachel Heyard

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16``` ```# 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') ```

TBFmultinomial documentation built on May 2, 2019, 2:11 p.m.