Learn R Programming

spBayesSurv (version 1.0.2)

GetCurves: Density, Survival, and Hazard Estimates

Description

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

Usage

GetCurves(fit, xpred, ygrid, CI=c(0.05, 0.95), xtfpred=NULL, 
          IDpred=NULL, AFTbaseline=FALSE)

Arguments

fit
an object obtained from functions including anovaDDP, spCopulaDDP, indeptCoxph, spCopulaCoxph, and frailtyGAFT.
xpred
an npred 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.
xtfpred
an npred by q vector of covariates matrix if frailtyGAFT is fitted.
IDpred
an npred by 1 vector indicates the cluster ID of each predicted subject if frailty model is fitted.
AFTbaseline
a logical value indicate if only baseline curves are needed. The default is FALSE.

Value

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

Details

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

References

De Iorio, M., Johnson, W. O., Mueller, P., and Rosner, G. L. (2009). Bayesian nonparametric nonproportional hazards survival modeling. Biometrics, 65(3): 762-771. Zhou, H., Hanson, T. and Knapp, R. (2014+). Marginal Bayesian nonparametric model for the time-to-extinction of the mountain yellow-legged frog. Biometrics. In revision. Zhou, H., Hanson, T. and Zhang, J. (2014+). Generalized accelerated failure time spatial frailty model for arbitrarily censored data. Submitted

See Also

anovaDDP, spCopulaDDP, indeptCoxph, spCopulaCoxph, frailtyGAFT