basehaz {survival} | R Documentation

## Compute the baseline survival curve for a Cox model

### Description

Compute the baseline survival curve for a Cox model.

### Usage

    basehaz(fit, centered = TRUE)

### Arguments

`fit` | The result of a `coxph` fit.
`centered` | If TRUE, the resultant curve is for a hypothetical subject whose covariate values are the corresponding means from the original data, otherwise for a hypothetical subject with a mean vector of zero.

### Details

This function exists primarily because users will look for the phrase 'baseline hazard' (often SAS converts looking for familiar keywords.) The primary function for creating a survival curve is `survfit`, which this calls. See that manual page for more options, including confidence limits and the ability to use other covariate vectors. The result of `survfit` also has print, plot and summary methods that make it far more useful.

### Value

a data frame with components

`time` | The sorted vector of unique time points (those at which an event occurred
`hazard` | The baseline hazard function
`strata` | If `fit` was a stratified Cox model, the strata. There will be one survival curve per strata.

### See Also

`survfit`

[Package survival version 2.36-14 Index]