qrnegLogLikensumOR1 {bqror}R Documentation

Negative log-likelihood in the OR1 model

Description

This function computes the negative of log-likelihood for each individual and negative sum of log-likelihood in the OR1 model.

Usage

qrnegLogLikensumOR1(y, x, betaOne, deltaOne, 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.

betaOne

a sample draw of \beta of size (k x 1).

deltaOne

a sample draw of \delta of size ((J-2) x 1).

p

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

Details

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).

Value

Returns a list with components

nlogl:

vector of negative log-likelihood values.

negsumlogl:

negative sum of log-likelihood.

References

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

See Also

likelihood maximization

Examples

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


[Package bqror version 1.7.0 Index]