Usage
survexp(formula, data, weights, subset, na.action, times, cohort=TRUE,
conditional=FALSE, ratetable=survexp.us, scale=1, npoints,
se.fit, model=FALSE, x=FALSE, y=FALSE)
Arguments
formula
formula object. The response variable is a vector of follow-up times
and is optional. The predictors consist of optional grouping variables
separated by the +
operator (as in survfit
), along with a ratetable
te
data
data frame in which to interpret the variables named in
the formula
, subset
and weights
arguments.
subset
expression indicating a subset of the rows of data
to be used in the fit.
na.action
function to filter missing data. This is applied to the model frame after
subset
has been applied. Default is options()$na.action
. A possible
value for na.action
is na.omit
, which deletes observation
times
vector of follow-up times at which the resulting survival curve is
evaluated. If absent, the result will be reported for each unique
value of the vector of follow-up times supplied in formula
.
cohort
logical value: if FALSE
, each subject is treated as a subgroup of size 1.
The default is TRUE
.
conditional
logical value: if TRUE
, the follow-up times supplied in formula
are death times and conditional expected survival is computed.
If FALSE
, the follow-up times are potential censoring times.
If follow-up times are m
ratetable
a table of event rates, such as survexp.uswhite
, or a fitted Cox model.
scale
numeric value to scale the results. If ratetable
is in units/day,
scale = 365.25
causes the output to be reported in years.
npoints
number of points at which to calculate intermediate results, evenly spaced
over the range of the follow-up times. The usual (exact) calculation is done
at each unique follow-up time. For very large data sets specifying npoints
can redu
se.fit
compute the standard error of the predicted survival.
The default is to compute standard errors whenever
possible, which at this time is only for the Ederer method and a Cox
model as the rate table.
model,x,y
flags to control what is returned. If any of these is true, then the
model frame, the model matrix, and/or the vector of response times will be
returned as components of the final result, with the same names as the
flag arguments.