Btqr2: Bayesian tobit quantile regression

Description Usage Arguments Author(s) Examples

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.

Author(s)

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)

Brq documentation built on May 2, 2019, 4:12 a.m.