lqm.BQt: 'lqm.BQt' fits linear quantile regression model

Description Usage Arguments Value Author(s) Examples

View source: R/lqm.BQt.R

Description

Function using JAGS to estimate the linear quantile regression model assuming asymmetric Laplace distribution for residual error.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
lqm.BQt(
  formula,
  data,
  tau = 0.5,
  n.chains = 1,
  n.iter = 10000,
  n.burnin = 5000,
  n.thin = 5,
  n.adapt = 5000,
  quiet = FALSE
)

Arguments

formula

formula for the quantile regression including response variable

data

dataset of observed variables

tau

the quantile(s) to be estimated. This must be a number between 0 and 1, otherwise the execution is stopped. If more than one quantile is specified, rounding off to the 4th decimal must give non–duplicated values of tau, otherwise the execution is stopped.

n.chains

the number of parallel chains for the model; default is 1.

n.iter

integer specifying the total number of iterations; default is 10000

n.burnin

integer specifying how many of n.iter to discard as burn-in ; default is 5000

n.thin

integer specifying the thinning of the chains; default is 1

n.adapt

integer specifying the number of iterations to use for adaptation; default is 5000

quiet

see rjags package

Value

A BQt object which is a list with the following elements:

Coefficients

list of posterior median of each parameter

ICs

list of the credibility interval at 0.95

data

data include in argument

sims.list

list of the MCMC chains of the parameters

Author(s)

Antoine Barbieri

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#---- Use data
data(wave)

#---- Fit regression model for the first quartile
BQt_025 <- lqm.BQt(formula = h110d~vent_vit_moy,
                   data = wave,
                   tau = 0.25)

#---- Get the estimated coefficients
BQt_025$coefficients

#---- Summary of output
summary.BQt(BQt_025)

AntoineBbi/BQt documentation built on Jan. 8, 2020, 4:13 a.m.