These functions are used by the Cox Proportional Hazards dialog.
menuCoxph
calls
tabSummary.coxph,
tabPredict.coxph and
tabSurvfit.coxph
if summary, prediction, and survival curve results
are requested.
a formula object having a
Surv object as the response on the left of
a ~ operator, and the terms, separated by
+ operators, on the right.
fit
an object of class
coxph.
object
an object of class
coxph.
OPTIONAL ARGUMENTS:
data
an optional data frame in which to interpret the variables occurring in the
formula.
subset
an expression saying which subset of the rows of the data should be used
in the fit. This can be a logical vector (which is replicated to have
length equal to the number of observations), or a numeric vector indicating
which observation numbers are to be included, or a character vector of the
row names to be included. All observations are included by default.
na.omit.p
if
TRUE, then any observation with missing values are removed
from the analysis. If
FALSE and there are missing values then the
function will exit with a message that missing values are not allowed.
If
na.omit.p is
TRUE then
na.action is set to
na.omit in the
call to
coxph. If
na.omit.p is
FALSE then
na.action is set
to
na.fail in the call to
coxph.
weights
the optional case weights.
eps
convergence threshold. Iteration will continue until the relative change
in the log-likelihood is less than
eps.
init
vector of initial values of the iteration. In the call to
coxph, the
initial value for all variables is 0, by default.
iter.max
maximum number of iterations to perform.
method
a character string specifying the method for tie handling. Possible values
are
"efron",
"breslow", and
"exact".
singular.ok
if
TRUE, columns of the X matrix that are linear combinations of earlier
columns will be skipped.
robust
if
TRUE, a robust variance estimate is returned.
print.short
if
TRUE, a short summary of the nonparametric survival model is printed.
This output is from the function
print.coxph.
print.long
if
TRUE, a long summary of the nonparametric survival model is printed.
This output is from the function
summary.coxph.
predict.p
if
TRUE, predictions will be saved to the data frame specified in
save.name.
newdata
a data frame to use for computing predictions. It must contain
the same names as those used in the original analysis. If missing, the
predictions for the original data are computed.
save.name
a character string for the name of the data frame to save the predictions
and standard errors in. If a data frame with this name already exists in
database 1 and it has the appropriate number of rows then the saved values
will be appended to the data frame. If the object already exist in
database 1 and it is not a data frame or it does not have the appropriate
number of rows then a new name is created by appending a number to
save.name and the results are saved in the data frame with the new name.
type
a character string indicating the type of predictions. Possible values
are
"lp",
"risk",
"expected", and
"terms".
se.fit
if
TRUE, standard errors will be saved to the data frame specified in
save.name.
collapse
a grouping variable over which to collapse the predictions.
predict.coxph
will sum the predictions for each level of this variable.
plot.fit
if
TRUE, a plot of the survival curves is created.
newdata2
a data frame with the same variable names as those that appear in
formula.
The value of
newdata2 is passed to the
newdata argument in
tabSurvfit.coxph.
individual
if
TRUE, the data frame represents different time epochs for only one
individual. If
FALSE, multiple rows indicate multiple individuals.
plot.conf.int
if
TRUE, confidence intervals are included on the plot.
col
a list of integers specifying colors for each curve. The list
is converted to a vector for the call to
survfit. Elements of the list
are reused cyclically if the length of the list is shorter than the number
of curves.
lty
a list of integers specifying line types for each curve. The list
is converted to a vector for the call to
survfit. Elements of the list
are reused cyclically if the length of the list is shorter than the number
of curves.
lwd
a list of numeric values for line widths for each curve. The list
is converted to a vector for the call to
survfit. Elements of the list
are reused cyclically if the length of the list is shorter than the number
of curves.
log
if
TRUE, the y-axis will be on the log scale.
yscale
a numeric value used to multiply the labels on the y-axis.
xscale
a numeric value used like
yscale for labels on the x-axis.
xlab
a character string used to label the x-axis.
ylab
a character string used to label the y-axis.
xaxs
a character string denoting the x-axis style. Possible values are
"standard",
"tight", and
"extended". These values are converted to
NULL,
"i", and
"e", respectively, for the call to
plot.survfit.
curve.type
a character string specifying the type of survival curve. Possible values
are
"aalen" and
"kaplan-meier".
conf.int
the level for a two-sided confidence interval on the survival curve(s).
conf.type
a character string specifying the confidence interval type. Possible values
are
"none" for no confidence intervals,
"plain" for standard intervals,
"log" for intervals based on the cumulative hazard, and
"log-log" for
intervals based on the log hazard.
VALUE:
an object of class
coxph. See the
coxph.object help file for details.
SIDE EFFECTS:
Survial curves will be drawn if requested. The object
save.name will be
created or appended to if predictions or standard errors are saved.