drawdeltaOR1 {bqror}R Documentation

Samples \delta in the OR1 model

Description

This function samples the cut-point vector \delta using a random-walk Metropolis-Hastings algorithm in the OR1 model (ordinal quantile model with 3 or more outcomes).

Usage

drawdeltaOR1(y, x, beta, delta0, d0, D0, tune, Dhat, p)

Arguments

y

observed ordinal outcomes, column vector of size (n x 1).

x

covariate matrix of size (n x k) including a column of ones with or without column names.

beta

Gibbs draw of \beta, column vector of size (k x 1).

delta0

initial value for \delta.

d0

prior mean for \delta.

D0

prior covariance matrix for \delta.

tune

tuning parameter to adjust MH acceptance rate.

Dhat

negative inverse Hessian from maximization of log-likelihood.

p

quantile level or skewness parameter, p in (0,1).

Details

Samples the cut-point vector \delta using a random-walk Metropolis-Hastings algorithm.

Value

Returns a list with components

deltaReturn:

\delta, a column vector of size ((J-2) x 1), sampled using MH algorithm.

accept:

indicator for acceptance of the proposed value of \delta.

References

Rahman, M. A. (2016). '"Bayesian Quantile Regression for Ordinal Models."' Bayesian Analysis, 11(1): 1-24. DOI: 10.1214/15-BA939

Chib, S., and Greenberg, E. (1995). '"Understanding the Metropolis-Hastings Algorithm."' The American Statistician, 49(4): 327-335. DOI: 10.2307/2684568

Jeliazkov, I., and Rahman, M. A. (2012). '"Binary and Ordinal Data Analysis in Economics: Modeling and Estimation"' in Mathematical Modeling with Multidisciplinary Applications, edited by X.S. Yang, 123-150. John Wiley & Sons Inc, Hoboken, New Jersey. DOI: 10.1002/9781118462706.ch6

See Also

NPflow, Gibbs sampling, mvnpdf

Examples

set.seed(101)
data("data25j4")
y <- data25j4$y
xMat <- data25j4$x
p <- 0.25
beta <- c(0.3990094, 0.8168991, 2.8034963)
delta0 <- c(-0.9026915, -2.2488833)
d0 <- matrix(c(0, 0),
                 nrow = 2, ncol = 1, byrow = TRUE)
D0 <- matrix(c(0.25, 0.00, 0.00, 0.25),
                    nrow = 2, ncol = 2, byrow = TRUE)
tune <- 0.1
Dhat <- matrix(c(0.046612180, -0.001954257, -0.001954257, 0.083066204),
             nrow = 2, ncol = 2, byrow = TRUE)
p <- 0.25
output <- drawdeltaOR1(y, xMat, beta, delta0, d0, D0, tune, Dhat, p)

# deltareturn
#   -0.9025802 -2.229514
# accept
#   1


[Package bqror version 1.7.0 Index]