summary.bayesQR {bayesQR}R Documentation

Summarize the output of the bayesQR function

Description

summary.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.

Usage

  ## S3 method for class 'bayesQR'
summary(object, burnin=0, credint=c(.025,.975), quantile=NULL, ...)

Arguments

object

an output object of the bayesQR function, i.e. an S3 object of class bayesQR.

burnin

the number of burnin draws that should be discarded (default=0, meaning all draws are included).

credint

the width of the credible interval (default=c(0.025, 0.975)).

quantile

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.

Value

An object of class bayesQR.summary, basically a list including elements:

method

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.

normal.approx

logical flag for normal approximation of posterior distribution.

quantile

the quantile that was estimated.

names

character vector containing the names of the independent variables in the model.

burnin

the number of burnin draws that were discarded.

retained

the number of draws that were retained and used to calculate the summary statistics.

credint

the width of the credible interval.

betadraw

the Bayes estimate, credible interval and, if normal.approx=TRUE, the adjusted credible intervals of the beta draws.

sigmadraw

the Bayes estimate and credible interval of the sigma draws.

Author(s)

Dries F. Benoit

Examples

# 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

[Package bayesQR version 2.4 Index]