lrt.stat: Likelihood ratio type statistic (global)

Description Usage Arguments Value Note See Also Examples

View source: R/test.stat.r

Description

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.

Usage

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

Arguments

theta

estimated coefficients.

theta.null

coefficients estimated under the null hypothesis.

cov.theta

covariance matrix of the (unconstrained) coefficients.

...

additional arguments, to enable custom test statistic functions.

Value

Output is a numeric value.

Note

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

Examples

1
2
3
4
5
6
7
8
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 )

jelsema/CLME documentation built on June 13, 2020, 10:24 a.m.