survfitcoxph.fit {survival} | R Documentation |
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)
y |
the response variable used in the Cox model. (Missing values removed of course.) |
x |
covariate matrix used in the Cox model |
wt |
weight vector for the Cox model. If the model was unweighted use a vector of 1s. |
x2 |
matrix describing the hypothetical subjects for which a
curve is desired. Must have the same number of columns as |
risk |
the risk score exp(X beta) from the fitted Cox model. If the model had an offset, include it in the argument to exp. |
newrisk |
risk scores for the hypothetical subjects |
strata |
strata variable used in the Cox model. This will be a factor. |
se.fit |
if |
survtype |
1=Kalbfleisch-Prentice, 2=Nelson-Aalen, 3=Efron. It is
usual to match this to the approximation for ties used in the
|
vartype |
1=Greenwood, 2=Aalen, 3=Efron |
varmat |
the variance matrix of the coefficients |
id |
optional; if present and not NULL this should be
a vector of identifiers of length |
y2 |
survival times, for time dependent prediction. It gives
the time range (time1,time2] for each row of |
strata2 |
vector of strata indicators for |
unlist |
if |
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.
The source code for for both this function and
survfit.coxph
is written using noweb. For complete
documentation see the inst/sourcecode.pdf
file.
Terry Therneau