qrnegLogLikeOR2 | R Documentation |
This function computes the negative sum of log-likelihood in the OR2 model (ordinal quantile model with exactly 3 outcomes).
qrnegLogLikeOR2(y, x, gammacp, betaOne, sigmaOne, p)
y |
observed ordinal outcomes, column vector of size |
x |
covariate matrix of size |
gammacp |
a row vector of cutpoints including (-Inf, Inf). |
betaOne |
a sample draw of |
sigmaOne |
a sample draw of |
p |
quantile level or skewness parameter, p in (0,1). |
This function computes the negative sum of log-likelihood in the OR2 model where the error is assumed to follow an AL distribution.
Returns the negative sum of log-likelihood.
Rahman, M. A. (2016). '"Bayesian Quantile Regression for Ordinal Models."' Bayesian Analysis, 11(1): 1-24. DOI: 10.1214/15-BA939
likelihood maximization
set.seed(101)
data("data25j3")
y <- data25j3$y
xMat <- data25j3$x
p <- 0.25
gammacp <- c(-Inf, 0, 3, Inf)
betaOne <- c(1.810504, 1.850332, 6.18116)
sigmaOne <- 0.9684741
output <- qrnegLogLikeOR2(y, xMat, gammacp, betaOne, sigmaOne, p)
# output
# 902.4045
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.