survCurve {dynsurv} R Documentation

## Estimated Survival Function or Cumulative Hazard Function

### Description

Estimated survival function or cumulative hazard function from posterior sample for an object returned by function bayesCox.

### Usage

survCurve(
object,
newdata,
type = c("survival", "cumhaz"),
level = 0.95,
centered = FALSE,
...
)


### Arguments

 object An object returned by function bayesCox. newdata An optional data frame used to generate a design matrix. type An optional character value indicating the type of function to compute. The possible values are "survival" and "cumhaz". The former means the estimated survival function; the latter represents the estimated cumulative hazard function for the given newdata. level A numerical value between 0 and 1 indicating the level of cradible band. centered A logical value. If TRUE, the mean function for the given newdata will be computed. The default is FALSE. ... Other arguments for further usage.

### Details

The estimated survival curve is a step function representing the posterior mean survival proportion at the given time grid from the posterior sample. The credible interval for the survival curve is constructed based on the quantiles of all the survival curves from posterior sample at given credible level. More details were available in Section posterior computation of Wang (2016).

### Value

A data frame with column: "Low", "Mid", "High", "Time", "Design", and "type", and attribute, "surv" valued as "survCurve".

### References

Wang, W., Chen, M. H., Chiou, S. H., Lai, H. C., Wang, X., Yan, J., & Zhang, Z. (2016). Onset of persistent pseudomonas aeruginosa infection in children with cystic fibrosis with interval censored data. BMC Medical Research Methodology, 16(1), 122.

bayesCox, survDiff, and plotSurv.
## See the examples in bayesCox.