qrnegLogLikensumOR1 | R Documentation |
This function computes the negative of log-likelihood for each individual and negative sum of log-likelihood in the OR1 model.
qrnegLogLikensumOR1(y, x, betaOne, deltaOne, p)
y |
observed ordinal outcomes, column vector of size |
x |
covariate matrix of size |
betaOne |
a sample draw of |
deltaOne |
a sample draw of |
p |
quantile level or skewness parameter, p in (0,1). |
This function computes the negative of log-likelihood for each individual and negative sum of log-likelihood in the OR1 model.
The latter when evaluated at postMeanbeta and postMeandelta is used to calculate the DIC and may also be utilized to calculate the Akaike information criterion (AIC) and the Bayesian information criterion (BIC).
Returns a list with components
nlogl : |
vector of negative log-likelihood values. |
negsumlogl : |
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)
deltaOne <- c(-0.002570995, 1.044481071)
data("data25j4")
y <- data25j4$y
xMat <- data25j4$x
p <- 0.25
betaOne <- c(0.3990094, 0.8168991, 2.8034963)
output <- qrnegLogLikensumOR1(y, xMat, betaOne, deltaOne, p)
# nlogl
# 0.7424858
# 1.1649645
# 2.1344390
# 0.9881085
# 2.7677386
# 0.8229129
# 0.8854911
# 0.3534490
# 1.8582422
# 0.9508680 .. soon
# negsumlogl
# 663.5475
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.