View source: R/summary.bayesQR.r
summary.bayesQR | R Documentation |
bayesQR
function 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.
## S3 method for class 'bayesQR'
summary(object, burnin=0, credint=c(.025,.975), quantile=NULL, ...)
object |
an output object of the |
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 |
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 |
sigmadraw |
the Bayes estimate and credible interval of the sigma draws. |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.