GetCurves {spBayesSurv} | R Documentation |
Density, Survival, and Hazard Estimates
Description
This function estimates density, survival, and hazard functions given covariates.
Usage
GetCurves(x, xnewdata, xtfnewdata, tgrid = NULL, ygrid = NULL,
frail = NULL, CI = 0.95, PLOT = TRUE, ...)
## S3 method for class 'survregbayes'
plot(x, xnewdata, tgrid = NULL,
frail = NULL, CI = 0.95, PLOT = TRUE, ...)
## S3 method for class 'frailtyGAFT'
plot(x, xnewdata, xtfnewdata, tgrid = NULL,
frail = NULL, CI = 0.95, PLOT = TRUE, ...)
## S3 method for class 'SuperSurvRegBayes'
plot(x, xnewdata, tgrid = NULL, CI = 0.95, PLOT = TRUE, ...)
## S3 method for class 'indeptCoxph'
plot(x, xnewdata, tgrid = NULL, CI = 0.95, PLOT = TRUE, ...)
## S3 method for class 'anovaDDP'
plot(x, xnewdata, tgrid = NULL, CI = 0.95, PLOT = TRUE, ...)
## S3 method for class 'spCopulaCoxph'
plot(x, xnewdata, tgrid = NULL, CI = 0.95, PLOT = TRUE, ...)
## S3 method for class 'spCopulaDDP'
plot(x, xnewdata, tgrid = NULL, CI = 0.95, PLOT = TRUE, ...)
## S3 method for class 'SpatDensReg'
plot(x, xnewdata, ygrid = NULL, CI = 0.95, PLOT = TRUE, ...)
Arguments
x |
an object obtained from the functions |
xnewdata |
A data frame in which to look for variables with which to obtain estimated curves. |
xtfnewdata |
A data frame in which to look for variables with which to obtain estimated curves, used only for |
tgrid |
a vector of grid points indicating where the curves will be estimated. |
ygrid |
a vector of grid points indicating where the curves will be estimated, used only for |
frail |
an optional matrix of posterior frailty values for |
CI |
a numeric value indicating the level of credible interval. |
PLOT |
a logical value indicating whether the estimated survival curves will be plotted. |
... |
further arguments to be passed to or from other methods. |
Details
This function estimates density, survival, and hazard functions given covariates.
Value
Use names
to find out what they are, where fhat
represents density, Shat
represents survival, hhat
represents hazard. The credible bands are also provided, e.g., Shatlow
represents the lower band and Shatup
represents the upper band.
Author(s)
Haiming Zhou and Timothy Hanson
See Also
survregbayes
, frailtyGAFT
, SuperSurvRegBayes
, indeptCoxph
, anovaDDP
, spCopulaCoxph
, spCopulaDDP
and SpatDensReg