ordregr_lpost {ordgam}R Documentation

Log-posterior function for a proportional odds model

Description

Log-posterior function for a proportional odds model

Usage

ordregr_lpost(
  y,
  nc,
  Xcal,
  theta,
  descending = FALSE,
  prior = list(mean = NULL, Prec = NULL),
  gradient = TRUE,
  Hessian = TRUE
)

Arguments

y

Vector containing the ordinal response (coded using integers in 1:nc).

nc

(optional) Maximum value of y.

Xcal

Design matrix.

theta

Vector c(alpha,beta) with intercepts <alpha> and regression parameters <beta>.

descending

Logical indicating if the odds of the response taking a value in the upper scale should be preferred over values in the lower scale.

prior

(optional) List given the mean and Prec(ision) of the regression parameters.

gradient

Logical indicating if the gradient of the log-posterior should be computed.

Hessian

Logical indicating if the Hessian of the log-posterior should be computed.

Value

The log-posterior with the following attributes:

References

Lambert, P. and Gressani, 0. (2023) Penalty parameter selection and asymmetry corrections to Laplace approximations in Bayesian P-splines models. Statistical Modelling. <doi:10.1177/1471082X231181173>. Preprint: <arXiv:2210.01668>.


[Package ordgam version 0.9.1 Index]