qrnegLogLikeOR2: Negative sum of log-likelihood in the OR2 model

View source: R/ORII.R

qrnegLogLikeOR2R Documentation

Negative sum of log-likelihood in the OR2 model

Description

This function computes the negative sum of log-likelihood in the OR2 model (ordinal quantile model with exactly 3 outcomes).

Usage

qrnegLogLikeOR2(y, x, gammacp, betaOne, sigmaOne, 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.

gammacp

a row vector of cutpoints including (-Inf, Inf).

betaOne

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

sigmaOne

a sample draw of \sigma, a scalar value.

p

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

Details

This function computes the negative sum of log-likelihood in the OR2 model where the error is assumed to follow an AL distribution.

Value

Returns the 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)
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


bqror documentation built on May 31, 2023, 5:19 p.m.

Related to qrnegLogLikeOR2 in bqror...