StepOne {SMAHP}R Documentation

Penalized mediation and outcome models

Description

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.

Usage

StepOne(X, M, time, status, model_option = "MCP")

Arguments

X

An n by p matrix of exposures.

M

An n by p matrix of mediators.

time

A vector of survival time of samples.

status

A vector of status indicator: 0=alive, 1=dead.

model_option

The penalization method used when selecting X for M. The options include MCP, elastic net and lasso. Default is MCP.

Value

A list with the following components:

X_sel_Y_s1

X selected for Y using penAFT

M_X_s1

X selected for M using the selected penalized model

M_sel_Y_s1

M selected for Y using penAFT

Examples


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")



[Package SMAHP version 0.0.5 Index]