Learn R Programming

spBayesSurv (version 1.0.0)

GetCurves: Obtain estimated mariginal density, survival, and hazard functions given covariates

Description

This function estimates mariginal density, survival, and hazard functions given covariates.

Usage

GetCurves(fit, xpred, ygrid, CI=c(0.05, 0.95))

Arguments

fit
an object obtained from functions including anovaDDP, spCopulaDDP, indeptCoxph and spCopulaCoxph.
xpred
an n by p vector of covariates matrix used for curve estimates.
ygrid
a vector of grid points (in log survival time scale) indicating where the curves will be estimated.
CI
a vector to indicate the level of credible interval, where first element indicate the lower probability.

Value

  • Use names to find out what they are, where fhat represents density, Shat represents survival and Hhat represents hazard.

Details

This function fits an ANOVA DDP model (De Iorio et al., 2009) for survival analysis of right censored time-to-event data.

See Also

anovaDDP, spCopulaDDP, indeptCoxph, spCopulaCoxph