coxph(formula, data=sys.parent(), weights, subset,
na.action, init, control, method=c("efron","breslow","exact"),
singular.ok=T, robust,
model=F, x=F, y=T,...
)~ operator, and
the terms on the right. The response must be a survival object as
returned by the Surv function.formula, or in the subset and the weights argument.options()$na.action.coxph.control specifying iteration limit
and other control options. Default is coxph.control(...).TRUE, the program will automatically skip over columns of the X matrix
that are linear combinations of earlier columns. In this case the
coefficients for such columnTRUE if the
model includes a cluster() operative, FALSE otherwise."coxph". See coxph.object for details.predict, residuals, and survfit routines may
need to reconstruct the x matrix created by coxph. Differences in the
environment, such as which data frames are attached or the value of
options()$contrasts, may cause this computation to fail or worse, to be
incorrect. See the survival overview document for details.cluster term is used to compute a robust variance for the model.
The term + cluster(id), where id == unique(id), is equivalent to
specifying the robust=T argument, and produces an approximate jackknife
estimate of the variance. If the id variable were not unique, but instead
identifies clusters of correlated observations, then the variance estimate
is based on a grouped jackknife.T. Therneau, P. Grambsch, and T. Fleming. "Martingale based residuals for survival models", Biometrika, March 1990.
cluster, survfit, Surv, strata,ridge, pspline,frailty.
# # Create a simple data set for a time-dependent model # test2 <- list(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8), stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17), event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0), x =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
summary( coxph( Surv(start, stop, event) ~ x, test2))