Package: bqror 1.4.0

bqror: Bayesian Quantile Regression for Ordinal Models

Package provides functions for estimating Bayesian quantile regression with ordinal outcomes, computing the covariate effects, model comparison measures, and inefficiency factor. The generic ordinal model with 3 or more outcomes (labeled OR1 model) is estimated by a combination of Gibbs sampling and Metropolis-Hastings algorithm. Whereas an ordinal model with exactly 3 outcomes (labeled OR2 model) is estimated using Gibbs sampling only. For each model framework, there is a specific function for estimation. The summary output produces estimates for regression quantiles and two measures of model comparison — log of marginal likelihood and Deviance Information Criterion (DIC). The package also has specific functions for computing the covariate effects and other functions that aids either the estimation or inference in quantile ordinal models. Rahman, M. A. (2016).“Bayesian Quantile Regression for Ordinal Models.” Bayesian Analysis, II(I): 1-24 <doi:10.1214/15-BA939>. Yu, K., and Moyeed, R. A. (2001). “Bayesian Quantile Regression.” Statistics and Probability Letters, 54(4): 437–447 <doi:10.1016/S0167-7152(01)00124-9>. Koenker, R., and Bassett, G. (1978).“Regression Quantiles.” Econometrica, 46(1): 33-50 <doi:10.2307/1913643>. Chib, S. (1995). “Marginal likelihood from the Gibbs output.” Journal of the American Statistical Association, 90(432):1313–1321, 1995. <doi:10.1080/01621459.1995.10476635>. Chib, S., and Jeliazkov, I. (2001). “Marginal likelihood from the Metropolis-Hastings output.” Journal of the American Statistical Association, 96(453):270–281, 2001. <doi:10.1198/016214501750332848>.

Authors:Mohammad Arshad Rahman Developer [aut], Prajual Maheshwari [cre]

bqror_1.4.0.tar.gz
bqror_1.4.0.zip(r-4.5)bqror_1.4.0.zip(r-4.4)bqror_1.4.0.zip(r-4.3)
bqror_1.4.0.tgz(r-4.4-any)bqror_1.4.0.tgz(r-4.3-any)
bqror_1.4.0.tar.gz(r-4.5-noble)bqror_1.4.0.tar.gz(r-4.4-noble)
bqror_1.4.0.tgz(r-4.4-emscripten)bqror_1.4.0.tgz(r-4.3-emscripten)
bqror.pdf |bqror.html
bqror/json (API)

# Install 'bqror' in R:
install.packages('bqror', repos = c('https://prajual.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/prajual/bqror/issues

Datasets:
  • Educational_Attainment - Educational Attainment study based on data from the National Longitudinal Study of Youth (NLSY, 1979) survey.
  • Policy_Opinion - Data contains public opinion on the proposal to raise federal income taxes for couples
  • data25j3 - Simulated data from OR2 model for p = 0.25
  • data25j4 - Simulated data from OR1 model for p = 0.25
  • data50j3 - Simulated data from OR2 model for p = 0.5
  • data50j4 - Simulated data from OR1 model for p = 0.5
  • data75j3 - Simulated data from OR2 model for p = 0.75
  • data75j4 - Simulated data from OR1 model for p = 0.75

On CRAN:

24 exports 0.76 score 67 dependencies 4 scripts 1.4k downloads

Last updated 2 years agofrom:be425e5060. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 25 2024
R-4.5-winNOTEAug 25 2024
R-4.5-linuxNOTEAug 25 2024
R-4.4-winNOTEAug 25 2024
R-4.4-macNOTEAug 25 2024
R-4.3-winNOTEAug 25 2024
R-4.3-macNOTEAug 25 2024

Exports:alcdfalcdfstdcovEffectOR1covEffectOR2devianceOR1devianceOR2drawbetaOR1drawbetaOR2drawdeltaOR1drawlatentOR1drawlatentOR2drawnuOR2drawsigmaOR2drawwOR1infactorOR1infactorOR2logMargLikeOR1logMargLikeOR2qrminfundtheoremqrnegLogLikensumOR1qrnegLogLikeOR2quantregOR1quantregOR2rndald

Dependencies:backportsbitbit64broombroom.helpersclicliprcolorspacecpp11crayondplyrellipsefansifarverfastclusterforcatsgenericsGGallyggplot2ggstatsGIGrvggluegtablehavenhmsinvgammaisobandlabelinglabelledlatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmeNPflowpatchworkpheatmappillarpkgconfigplyrpracmaprettyunitsprogresspurrrR6RColorBrewerRcppRcppArmadilloreadrreshape2rlangscalesstringistringrtibbletidyrtidyselecttruncnormtzdbutf8vctrsviridisLitevroomwithr

Readme and manuals

Help Manual

Help pageTopics
cdf of an asymmetric Laplace distributionalcdf
cdf of a standard asymmetric Laplace distributionalcdfstd
Bayesian quantile regression for ordinal modelsbqror
Covariate effect for OR1 modelcovEffectOR1
Covariate effect for OR2 modelcovEffectOR2
Simulated data from OR2 model for p = 0.25 (i.e., 25th quantile)data25j3
Simulated data from OR1 model for p = 0.25 (i.e., 25th quantile)data25j4
Simulated data from OR2 model for p = 0.5 (i.e., 50th quantile)data50j3
Simulated data from OR1 model for p = 0.5 (i.e., 50th quantile)data50j4
Simulated data from OR2 model for p = 0.75 (i.e., 75th quantile)data75j3
Simulated data from OR1 model for p = 0.75 (i.e., 75th quantile)data75j4
Deviance Information Criterion for OR1 modeldevianceOR1
Deviance Information Criterion for OR2 modeldevianceOR2
Samples beta for OR1 modeldrawbetaOR1
Samples beta for model OR2drawbetaOR2
Samples delta for OR1 modeldrawdeltaOR1
Samples latent variable z for OR1 modeldrawlatentOR1
Samples latent variable z for OR2 modeldrawlatentOR2
Samples scale factor nu for OR2 modeldrawnuOR2
Samples sigma for OR2 modeldrawsigmaOR2
Samples latent weight w for OR1 modeldrawwOR1
Educational Attainment study based on data from the National Longitudinal Study of Youth (NLSY, 1979) survey.Educational_Attainment
Inefficiency factor for OR1 modelinfactorOR1
Inefficiency factor for OR2 modelinfactorOR2
Extractor function for log marginal likelihood for OR1 modellogLik logLik.bqrorOR1
Logarithm marginal likelihood for OR1 modellogMargLikeOR1
Marginal likelihood for OR2 modellogMargLikeOR2
Data contains public opinion on the proposal to raise federal income taxes for couples (individuals) earning more than $250,000 ($200,000) per year and a host of other covariates. The data is taken from the 2010-2012 American National Election Studies (ANES) on the Evaluation of Government and Society Study I (EGSS 1)Policy_Opinion
Minimizes the negative of log-likelihood for OR1 modelqrminfundtheorem
Negative log-likelihood for OR1 modelqrnegLogLikensumOR1
Negative sum of log-likelihood for OR2 modelqrnegLogLikeOR2
Bayesian quantile regression for OR1 modelquantregOR1
Bayesian quantile regression for OR2 modelquantregOR2
Generates random numbers from an AL distributionrndald