Estimated survival function or cumulative hazard function from posterior
sample for an object returned by function bayesCox
.
survCurve(
object,
newdata,
type = c("survival", "cumhaz"),
level = 0.95,
centered = FALSE,
...
)
A data frame with column: "Low", "Mid", "High", "Time", "Design", and "type", and attribute, "surv" valued as "survCurve".
An object returned by function bayesCox
.
An optional data frame used to generate a design matrix.
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
.
A numerical value between 0 and 1 indicating the level of cradible band.
A logical value. If TRUE
, the mean function for the
given newdata
will be computed. The default is FALSE
.
Other arguments for further usage.
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).
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.
Run the code above in your browser using DataLab