# survFit

##### Survival Curves for a Cox Proportional Hazards Model

Computes the predicted survivor function for a Cox proportional hazards model.

##### Usage

```
# S3 method for mboost
survFit(object, newdata = NULL, ...)
# S3 method for survFit
plot(x, xlab = "Time", ylab = "Probability", …)
```

##### Arguments

- object
an object of class

`mboost`

which is assumed to have a`CoxPH`

family component.- newdata
an optional data frame in which to look for variables with which to predict the survivor function.

- x
an object of class

`survFit`

for plotting.- xlab
the label of the x axis.

- ylab
the label of the y axis.

- ...
additional arguments passed to callies.

##### Details

If `newdata = NULL`

, the survivor function of the Cox proportional
hazards model is computed for the mean of the covariates used in the
`blackboost`

, `gamboost`

, or `glmboost`

call. The Breslow estimator is used for computing the baseline survivor
function. If `newdata`

is a data frame, the `predict`

method
of `object`

, along with the Breslow estimator, is used for computing the
predicted survivor function for each row in `newdata`

.

##### Value

An object of class `survFit`

containing the following components:

the estimated survival probabilities at the time points
given in `time`

.

the time points at which the survivor functions are evaluated.

the number of events observed at each time point given
in `time`

.

##### See Also

`gamboost`

, `glmboost`

and
`blackboost`

for model fitting.

##### Examples

```
# NOT RUN {
library("survival")
data("ovarian", package = "survival")
fm <- Surv(futime,fustat) ~ age + resid.ds + rx + ecog.ps
fit <- glmboost(fm, data = ovarian, family = CoxPH(),
control=boost_control(mstop = 500))
S1 <- survFit(fit)
S1
newdata <- ovarian[c(1,3,12),]
S2 <- survFit(fit, newdata = newdata)
S2
plot(S1)
# }
```

*Documentation reproduced from package mboost, version 2.9-1, License: GPL-2*