Learn R Programming

factorQR (version 0.1-4)

bayesQR: Bayesian quantile regression

Description

bayesQR is an MCMC sampler to fit a Bayesian quantile regression model. This does not assume a factor structure.

Arguments

formula
A formula of the form formula = Y ~ X1 + X2, where Y is the response and variables on the right-hand side are covariates.
dataSet
An optional data frame, list, or environment containing the variables in the model.
pQuant
Response quantile to model. Defaults to pQuant=0.5.
nSamp
Number of MCMC iterations, with a default of 5000.
burn
Iterations of burn-in, with a default of 0.
thin
Number of iterations to skip between stored values, with a default of 0.
C0
Prior shape for $\tau$, which is the inverse scale of the response. Defaults to 1.
D0
Prior scale for $\tau$.
B0
Prior precision (i.e., inverse variance) for $\beta$ regression parameters. Default is a diagonal matrix with non-zero values of 0.01. May be left at NULL, or changed to a non-negative scalar, a vector with length equal to the number of covariates, or a symmetric, positive semi-definite matrix with dimension equal to the number of covariates.
betaZero
Starting value for $\beta$.
verbose
If TRUE, prints progress updates in Gibbs sampler.

Value

Returns an item of the class bayesQR composed of the following components:
param
Matrix of sampled parameter values.
call
The matched call.
betLen
The number of $\beta$ components.
nObs
The number of observations.
burn
The number of Gibbs iterations before samples were stored.
thin
The number of Gibbs iterations between stored values.
nSamp
The total number of Gibbs iterations.