# quantreg_or2: Bayesian quantile regression for ordinal quantile model with... In bqror: Bayesian Quantile Regression for Ordinal Models

## Description

This function estimates Bayesian quantile regression for ordinal quantile model with 3 outcomes and reports the posterior mean, posterior standard deviation, and 95 percent posterior credible intervals of (β, σ).

## Usage

 `1` ```quantreg_or2(y, x, b0, B0 , n0, d0, gamma, mcmc, p, display) ```

## Arguments

 `y` observed ordinal outcomes, column vector of dimension (n x 1). `x` covariate matrix of dimension (n x k) including a column of ones with or without column names. `b0` prior mean for normal distribution to sample β, default is 0. `B0` prior variance for normal distribution to sample β `n0` prior for shape parameter to sample σ from inverse gamma distribution, default is 5. `d0` prior for scale parameter to sample σ from inverse gamma distribution, default is 8. `gamma` one and only cut-point other than 0. `mcmc` number of MCMC iterations, post burn-in. `p` quantile level or skewness parameter, p in (0,1). `display` whether to print the final output or not, default is TRUE.

## Details

Function implements the Bayesian quantile regression for ordinal quantile model with 3 outcomes using a Gibbs sampling procedure.

Function initializes prior and then iteratively samples β, σ and latent variable z. Burn-in is taken as 0.25*mcmc and nsim = burn-in + mcmc.

## Value

Returns a list with components

• `postMeanbeta`: vector with mean of sampled β for each covariate.

• `postMeansigma`: vector with mean of sampled σ.

• `postStdbeta`: vector with standard deviation of sampled β for each covariate.

• `postStdsigma`: vector with standard deviation of sampled σ.

• `allQuantDIC`: results of the DIC criteria.

• `logMargLikelihood`: scalar value for log marginal likelihood.

• `beta`: matrix with all sampled values for β.

• `sigma`: matrix with all sampled values for σ.

## References

Rahman, M. A. (2016). “Bayesian Quantile Regression for Ordinal Models.” Bayesian Analysis, 11(1): 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.12691/ajams-6-6-4

Casella, G., and George, E. I. (1992). “Explaining the Gibbs Sampler.” The American Statistician, 46(3): 167-174. DOI: 10.1080/00031305.1992.10475878

Geman, S., and Geman, D. (1984). “Stochastic Relaxation, Gibbs Distributions, and the Bayesian Restoration of Images.” IEEE Transactions an Pattern Analysis and Machine Intelligence, 6(6): 721-741. DOI: 10.1109/TPAMI.1984.4767596

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20``` ```set.seed(101) data("data25j3") x <- data25j3\$x y <- data25j3\$y k <- dim(x) output <- quantreg_or2(y = y, x = x, B0 = 10*diag(k), mcmc = 50, p = 0.25) # Number of burn-in draws : 12.5 # Number of retained draws : 50 # Summary of MCMC draws : # Post Mean Post Std Upper Credible Lower Credible # beta_0 -4.5185 0.9837 -3.1726 -6.2000 # beta_1 6.1825 0.9166 7.6179 4.8619 # beta_2 5.2984 0.9653 6.9954 4.1619 # sigma 1.0879 0.2073 1.5670 0.8436 # Log of Marginal Likelihood: -404.57 # DIC: 801.82 ```
{"ft_lang_label":"__label__en","ft_lang_prob":0.6256158,"math_prob":0.9013771,"size":3151,"snap":"2021-43-2021-49","text_gpt3_token_len":984,"char_repetition_ratio":0.09755322,"word_repetition_ratio":0.089147285,"special_character_ratio":0.33957472,"punctuation_ratio":0.21013413,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9899584,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-12-04T10:09:15Z\",\"WARC-Record-ID\":\"<urn:uuid:f61968af-5ae9-44c3-b468-5dc0efd6d48c>\",\"Content-Length\":\"46379\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f1897202-6367-4ceb-a32c-6a698253ddc6>\",\"WARC-Concurrent-To\":\"<urn:uuid:51ff47a9-ecd4-4a6c-ab35-d5e926c23fb5>\",\"WARC-IP-Address\":\"51.81.83.12\",\"WARC-Target-URI\":\"https://rdrr.io/cran/bqror/man/quantreg_or2.html\",\"WARC-Payload-Digest\":\"sha1:INTB6GVMNO4RCGM4XYWEWK44XVZDJ4KT\",\"WARC-Block-Digest\":\"sha1:5TTNPF75IUZERDURW5IHDEWH55BIDLI4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964362969.51_warc_CC-MAIN-20211204094103-20211204124103-00100.warc.gz\"}"}