Loglikelihood of the HLM model.

chlm_loglik(beta, gamma, y, delta, X, Z)

Arguments

beta

Mean parameter vector of length p.

gamma

Variance parameter vector of length q.

y

Vector of observations of length n.

delta

Optional logical vector of length n indicating the censorring status (TRUE: uncensored, FALSE: uncensored).

X

Mean covariate matrix of size n x p.

Z

Variance covariate matrix of size n x q.

Value

The loglikelihood evaluated at the parameters values (a scalar).