tvcFlex: Estimate the TD and/or NL effect(s) of time-varying...

tvcFlexR Documentation

Estimate the TD and/or NL effect(s) of time-varying continuous covariate(s) in time-to-event analysis

Description

Estimate the TD and/or NL effect(s) of time-varying continuous covariate(s) in time-to-event analysis

Usage

tvcFlex(data, Type, variables, TD, NL, TEL, m, p, knots)

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/stop of each time interval, event indicator, and names of variable representing the TEL of each sparsely mearused time-varying covariates. e.g. c("start","stop","event","tel").

variables

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

TD

A vector of binary indicators representing whether the corresponding variable has a time-dependent effect or not (1=Yes, 0=No).

NL

A vector of binary indicators representing whether the corresponding variable has a non-linear effect or not (1=Yes, 0=No).

TEL

A vector of binary indicators representing whether to adjust the TEL effect of the corresponding variable (1=Yes, 0=No).

m

The number of interior knots used in the regression B-spline

p

The degree of the regression B-spline

knots

Default value is -999, set the knots at the default place.

Value

Returns a list of the following items:

PLL

partial loglikelihood of the final model

NP

number of parameters estimated in the model

NE

number of events in the dataset

knots_covariates

knots for splines of NL effects for corresponding covariates

knots_time

knots for splines of the TD effect

knots_TEL

knots for splines of the TEL effect

variables

name of the covariates in the order they are adjusted in the model

coefficients_splines_NL

estimated splines coefficients for NL effects

coefficients_splines_TD

estimated splines coefficients for TD effects

coefficients_splines_TEL

estimated splines coefficients for TEL effects

coef

estimated coefficients for covariates not having TD and NL effects

sd

standard errors of the corresponding estimated coefficients

pval

p-values for corresponding estimated effects

Note

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


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