powered by
An auxiliary function which conducts variable selection of X for Y using penAFT, X for M using the selected penalized model and M for Y using penAFT.
StepOne(X, M, time, status, model_option = "MCP")
A list with the following components:
X selected for Y using penAFT
X selected for M using the selected penalized model
M selected for Y using penAFT
An n by p matrix of exposures.
An n by p matrix of mediators.
A vector of survival time of samples.
A vector of status indicator: 0=alive, 1=dead.
The penalization method used when selecting X for M. The options include MCP, elastic net and lasso. Default is MCP.
# \donttest{ data(example_dat) surv_dat <- example_dat$surv_dat res_step1 <- StepOne(X = example_dat$X, M = example_dat$M, time = surv_dat$time, status = surv_dat$status, model_option = "MCP") # }
Run the code above in your browser using DataLab