| parseCoxph {gmvjoint} | R Documentation |
Parsing the survival formula and constructing all survival-related data objects.
Description
Creates a set of survival data and fits a coxph model
using a survival formula and a data set.
Usage
parseCoxph(surv.formula, data, center = TRUE)
Arguments
surv.formula |
A formula readable by 'coxph'. |
data |
a set of data containing covariate information for variables named by ‘surv.formula'. Can be of any ’completeness', as the function returns a reduced set. |
center |
Should the covariate matrices be mean-centered before being returned?
defaults to |
Value
A list with class parseCoxph containing:
survdatareduced version of
data, with only one row per subject, with covariates specified bysurv.formulaalong with survival time and failure status.Smatmatrix containing all requisite survival covariates (one row per subject).
phthe model fit from
coxph.Deltalist of failure indicators for each of the unique subjects.
nnumber of unique subjects.
ftvector of unique failure times.
nevvector containing number of failures at each failure time
ft.survtimethe name of the
timevariable insurv.formula.statusthe name of the
eventvariable insurv.formula.
Examples
data = simData()$data
parseCoxph(Surv(survtime, status) ~ bin, data = data)