Learn R Programming

qbld (version 1.0.3)

qbld-package: qbld

Description

qbld

Arguments

Details

Package: qbld
Type: Package
Version: 1.0
Date: 2020-08-17
License: GPL (>= 3)

The package contains the following functions:

  • model.qbld : Runs the QBLD sampler as in Rahman and Vossmeyer(2019) and outputs a `qbld' class object.

  • summary.qbld : S3 method that summarizes the outputs of the model.qbld function.

  • plot.qbld : S3 method that plots `qbld' class object.

  • aldmix : Cumulative density, probability distribution function, quantile function and random generation for the asymmetric Laplace distribution.

  • gig : Probability distribution function, random generation for the generalised inverse Gaussian.

  • airpollution, locust : In-built datasets

References

Rahman, Mohammad Arshad and Angela Vossmeyer, <U+201C>Estimation and Applications of Quantile Regression for Binary Longitudinal Data,<U+201D> Advances in Econometrics, 40B, 157-191, 2019.

Vats, Dootika and Christina Knudson. <U+201C>Revisiting the Gelman-Rubin Diagnostic.<U+201D> arXiv

Keming Yu and Jin Zhang (2005) A Three-Parameter Asymmetric Laplace Distribution and Its Extension, Communications in Statistics - Theory and Methods.

Kobayashi, Genya. (2011). Gibbs Sampling Methods for Bayesian Quantile Regression. J Stat Comput Simul.

Devroye, L. Random variate generation for the generalized inverse Gaussian distribution. Stat Comput 24, 239<U+2013>246 (2014).

Wolfgang H<U+00F6>rmann and Josef Leydold (2013). Generating generalized inverse Gaussian random variates, Statistics and Computing.

J. S. Dagpunar (1989). An easily implemented generalised inverse Gaussian generator, Comm. Statist. B <U+2013> Simulation Comput. 18, 703<U+2013>710.

Examples

Run this code
# NOT RUN {
# Dataset
data(airpollution)

# output will be a qbld class object
output <- model.qbld(fixed_formula = wheeze~smoking+I(age^2)-1, data = airpollution, id="id", 
                      random_formula = ~1, p=0.25, nsim=1000, method="block", burn=0, 
                      summarize=FALSE, verbose=FALSE)
                      
# summary
summary(output, epsilon=0.1)
           
# plots           
plot(output)

# GIG sampler
rgig(n = 1, lambda = 0.5, a = 1, b = 2)

# ALD sampler
raldmix(n = 10, mu = 5, sigma = 10, p = 0.5)
# }

Run the code above in your browser using DataLab