# Btqr2: Bayesian tobit quantile regression In Brq: Bayesian Analysis of Quantile Regression Models

## Description

This function implements the idea of Bayesian Lasso tobit quantile regression using a likelihood function that is based on the asymmetric Laplace distribution (Rahim, 2016). The asymmetric Laplace error distribution is written as a scale mixture of normal distributions as in Reed and Yu (2009). This function implements the Bayesian lasso for linear tobit quantile regression models by assigning scale mixture of normal (SMN) priors on the parameters and independent exponential priors on their variances. A Gibbs sampling algorithm for the Bayesian Lasso tobit quantile regression is constructed by sampling the parameters from their full conditional distributions.

## Usage

 `1` ```BLtqr(x,y, tau = 0.5, left = 0, runs = 11000, burn = 1000, thin=1) ```

## Arguments

 `x` `Matrix of predictors.` `y` `Vector of dependent variable. ` `tau` `The quantile of interest. Must be between 0 and 1.` `left` ` Left censored point.` `runs` `Length of desired Gibbs sampler output.` `burn` `Number of Gibbs sampler iterations before output is saved.` `thin` `thinning parameter of MCMC draws.`

Rahim Alhamzawi

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```# Example n <- 150 p=8 Beta=c(5, 0, 0, 0, 0, 0, 0, 0) x <- matrix(rnorm(n=p*n),n) x=scale(x) y <-x%*%Beta+rnorm(n) y=y-mean(y) y=pmax(0, y) fit = Brq(y~0+x,tau=0.5, method="BLtqr",runs=5000, burn=1000) summary(fit) model(fit) ```

### Example output

```Call:
Brq.formula(formula = y ~ 0 + x, tau = 0.5, method = "BLtqr",
runs = 5000, burn = 1000)

tau:[1] 0.5

Estimate  L.CredIntv U.CredIntv
x1  4.849358578  4.56274890  5.1685121
x2 -0.061687712 -0.28482754  0.1613352
x3  0.069214771 -0.19994045  0.3277811
x4 -0.118814357 -0.35291958  0.1142364
x5 -0.001723594 -0.21338357  0.2218562
x6  0.107315910 -0.16884117  0.3814414
x7 -0.049105976 -0.32016516  0.1924383
x8  0.259916832  0.00739678  0.5133687
=====  Model selection based on credible intervals ======
#                                                       #
#               Author: Rahim Alhamzawi                 #
#               Contact: rahim.alhamzawi@qu.edu.iq      #
#                      July, 2018                       #
#                                                       #
=========================================================
Estimate
x1 4.8493586
x2 0.0000000
x3 0.0000000
x4 0.0000000
x5 0.0000000
x6 0.0000000
x7 0.0000000
x8 0.2599168
```

Brq documentation built on July 1, 2020, 7:07 p.m.