
Last chance! 50% off unlimited learning
Sale ends in
bayesQR
functionsummary.bayesQR
is an S3 method that summarizes the output of the bayesQR
function in an object of class bayesQR.summary.
For every estimated beta and sigma, this object contains the Bayes estimate and the posterior credible interval is calculated.
The object also contains other relevant information about the estimation procedure, such as the quantile, the variable names, etc.
# S3 method for bayesQR
summary(object, burnin=0, credint=c(.025,.975), quantile=NULL, ...)
An object of class bayesQR.summary
, basically a list including elements:
a string containing the method that was used, i.e. indicating whether the dependent variable was continuous or binary and whether adaptive lasso variable selection was used.
logical flag for normal approximation of posterior distribution.
the quantile that was estimated.
character vector containing the names of the independent variables in the model.
the number of burnin draws that were discarded.
the number of draws that were retained and used to calculate the summary statistics.
the width of the credible interval.
the Bayes estimate, credible interval and, if normal.approx=TRUE
, the adjusted credible intervals of the beta draws.
the Bayes estimate and credible interval of the sigma draws.
an output object of the bayesQR
function, i.e. an S3 object of class bayesQR.
the number of burnin draws that should be discarded (default=0, meaning all draws are included).
the width of the credible interval (default=c(0.025, 0.975)).
the quantile(s) of the quantile regressions that have to be summarized (default: all estimated quantiles in QRobj).
additional arguments passed to the generic summary
function.
Dries F. Benoit
# Load the Prostate cancer dataset
data(Churn)
# Estimate the model parameters with default prior
out <- bayesQR(churn~gender+recency, data=Churn, ndraw=2000)
# Return Bayes estimates and credible intervals
sum <- summary(out, burnin=1000)
# Inspect structure of bayesQR.summary object
str(sum)
# Print bayesQR.summary object
sum
Run the code above in your browser using DataLab