View source: R/ordregr_lpost.R
ordregr_lpost | R Documentation |
Log-posterior function for a proportional odds model
ordregr_lpost(
y,
nc,
Xcal,
theta,
descending = FALSE,
prior = list(mean = NULL, Prec = NULL),
gradient = TRUE,
Hessian = TRUE
)
y |
Vector containing the ordinal response (coded using integers in 1:nc). |
nc |
(optional) Maximum value of |
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. |
The log-posterior with the following attributes:
Salpha
:
gradient wrt intercepts 'alpha'.
Sbeta
:
gradient wrt regression parameters 'beta'.
grad
:
gradient wrt c(alpha,beta).
Halpha
:
Hessian wrt intercepts 'alpha'.
Hbeta
:
Hessian wrt regression parameters 'beta'.
Hba
:
cross-derivatives (Hessian) submatrix wrt 'alpha' & 'beta'.
Hessian
:
Hessian wrt c(alpha,beta).
dtheta
:
step in a Newton-Raphson iteration: solve(-Hessian,grad).
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>.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.