This program is mainly supplied to allow other packages to invoke the survfit.coxph function at a `data' level rather than a `user' level. It does no checks on the input data that is provided, which can lead to unexpected errors if that data is wrong.
survfitcoxph.fit(y, x, wt, x2, risk, newrisk, strata, se.fit, survtype,
vartype, varmat, id, y2, strata2, unlist=TRUE)
the response variable used in the Cox model. (Missing values removed of course.)
covariate matrix used in the Cox model
weight vector for the Cox model. If the model was unweighted use a vector of 1s.
matrix describing the hypothetical subjects for which a
curve is desired. Must have the same number of columns as x
.
the risk score exp(X beta) from the fitted Cox model. If the model had an offset, include it in the argument to exp.
risk scores for the hypothetical subjects
strata variable used in the Cox model. This will be a factor.
if TRUE
the standard errors of the curve(s) are returned
1=Kalbfleisch-Prentice, 2=Nelson-Aalen, 3=Efron. It is
usual to match this to the approximation for ties used in the
coxph
model: KP for `exact', N-A for `breslow' and Efron for `efron'.
1=Greenwood, 2=Aalen, 3=Efron
the variance matrix of the coefficients
optional; if present and not NULL this should be
a vector of identifiers of length nrow(x2)
.
A mon-null value signifies that x2
contains time dependent
covariates, in which case this identifies which rows of x2
go
with each subject.
survival times, for time dependent prediction. It gives
the time range (time1,time2] for each row of x2
. Note: this
must be a Surv object and thus contains a status indicator, which is
never used in the routine, however.
vector of strata indicators for x2
. This must
be a factor.
if FALSE
the result will be a list with one
element for each strata. Otherwise the strata are ``unpacked'' into
the form found in a survfit
object.
a list containing nearly all the components of a survfit
object. All that is missing is to add the confidence intervals, the
type of the original model's response (as in a coxph object), and the
class.