lrt.stat {CLME}R Documentation

Likelihood ratio type statistic (global)


Calculates the likeihood ratio type test statistic (under Normality assumption) for a constrained linear mixed effects model. This is the default test statistic for CLME.


lrt.stat(theta, theta.null, cov.theta, ...)



estimated coefficients.


coefficients estimated under the null hypothesis.


covariance matrix of the (unconstrained) coefficients.


additional arguments, to enable custom test statistic functions.


Output is a numeric value.


This is an internal function, unlikely to be useful outside of CLME-package. To define custom functions, the arguments available are:

theta, theta.null, cov.theta, B, A, Y, X1, X2, U, tsq, ssq, Nks, and Qs.

Of the additional arguments, B and A are identical to those produced by create.constraints. The rest, Y, X1, X2, U, tsq, , ssq, Nks, and Qs, are equivalent to arguments to clme_em.

Custom functions must produce numeric output. Output may have length greater than 1, which corresponds to testing multiple global hypotheses.

See Also

clme_em, w.stat


data( rat.blood )
cons <- list(order = "simple", decreasing = FALSE, node = 1 )

clme.out <- clme(mcv ~ time + temp + sex + (1|id), data = rat.blood , 
                 constraints = cons, seed = 42, nsim = 0)

# Individually compute lrt statistic
lrt.stat(clme.out$theta, clme.out$theta.null, clme.out$cov.theta )

[Package CLME version 2.0-12 Index]