| parseCoxph | R Documentation |
Creates a set of survival data and fits a coxph model
using a survival formula and a data set.
parseCoxph(surv.formula, data, center = TRUE)
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 |
A list with class parseCoxph containing:
survdatareduced version of data, with only one row per subject, with
covariates specified by surv.formula along 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 time variable in surv.formula.
statusthe name of the event variable in surv.formula.
data = simData()$data
parseCoxph(Surv(survtime, status) ~ bin, data = data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.