Learn R Programming

ordinalCont (version 0.4)

negloglik_glf_rnd: Log-likelihood function for the mixed-effects model

Description

Log-likelihood function for the mixed-effects continuous ordinal model, using the generalized logistic function as g function and the logit link function

Usage

negloglik_glf_rnd(par, v, d.matrix, rnd.matrix, wts, len_beta, rnd, n_nodes, quad, iclusters)

Arguments

par
vector of regression coefficients, M, B, T, (offset, slope and symmetry of the g function) and the standard deviation of the random effect
v
vector of standardized scores from the continuous ordinal scale
d.matrix
design matrix (fixed effects)
rnd.matrix
random term model matrix
wts
optional case weights
len_beta
length of the regression coefficients vector
rnd
character vector listing the random terms
n_nodes
order of Gauss-Hermite rule used (number of nodes)
quad
string indicating the type of quadrature used to integrate over the random effects. Can take values "Laplace" (Adaptive Gauss-Hermite quadrature using Laplace approximation; the default) or "GH" (Gauss-Hermite quadrature).
iclusters
list containing the row numbers of the design matrix relative to each level of the factor over which random effects are computed

Value

Minus the log-likelihood at parameter values par

Details

This function computes minus the log-likelihood function for a mixed-effects model using the generalized logistic function as g function and the logit link function. It is used internally to fit the model and should not be of interest of the user.