BackSelection: Build the model through backward selection

View source: R/BackSelection.R

BackSelectionR Documentation

Build the model through backward selection

Description

Build the model through backward selection

Usage

BackSelection(data, Type, variables, continuous, TD, NL, m = 1, p = 2,
  alpha_back = 0.05, knots = -999)

Arguments

data

A data frame in the long (interval) format with one line per unit of time.

Type

A vector consisting the name of variables representing the start and stop of each time interval and event indicator. e.g. c("start","stop","event").

variables

A vector consisting the name of varialbes that will be adjusted in the model.

continuous

A vector of binary indicators representing whether the corresponding variables are continuous variables (1=Yes, 0=NO)

TD

A vector representing whether to force the corresponding variable having a time-dependent effect. Only takes three values:
1 = force TD effect of the corresponding variable
0 = do not force any effect to the corresponding variable
-1 = force the PH effect of the corresponding variable

NL

A vector representing whether to force the corresponding variable having a non-linear effect. Only takes three values:
1 = force NL effect of the corresponding variable
0 = do not force any effect to the corresponding variable
-1 = force the linear effect of the corresponding variable

m

The number of interior knots used in the regression B-spline, default value is 1

p

The degree of the regression B-spline, default value is 2

alpha_back

significane level used in the backward elemination process

knots

Default value is -999

Note

Note that the TD and NL arguments have different meanings than that in the CoxFlex and tvcFlex


ywang297/CoxFlex documentation built on March 18, 2024, 3:26 a.m.