chisqmix: Chi-Squared Mixtures Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Density, distribution function, quantile function and random generation for mixtures of chi-squared distributions that corresponds to the null distribution of the Likelihood Ratio between 2 nested mixed models.

Usage

1
2
3
4
5
6
7
rchisqmix(n, s, q)

dchisqmix(x, s, q)

qchisqmix(p, s, q)

pchisqmix(quant, s, q, lower.tail = TRUE)

Arguments

n

number of observations.

s

number of fixed effects to be tested.

q

number of random effects to be tested.

x, quant

a quantile.

p

a probability.

lower.tail

logical; if TRUE (default), probabilities are P[X ≤ x]; otherwise, P[X > x].

Details

The approximate null distribution of a likelihood ratio for 2 nested mixed models, where both fixed and random effects are tested simultaneously, is a very specific mixture of chi-square distributions [Self & Liang (1987), Stram & Lee (1994) and Stram & Lee (1995)]. It depends on both the number of random effects and the number of fixed effects to be tested simultaneously:

LRT_H0~∑ k=q..q+r combination(r,k-q) 2^(-r) χ^2 (k)

Value

A vector of random independent observations of the chi-square mixture identified by the values of s and q.

Author(s)

Boris P. Hejblum

References

Self, S. G. and Liang, K., 1987, Asymptotic properties of maximum likelihood estimators and likelihood ratio tests under nonstandard conditions, Journal of the American Statistical Association 82: 605–610.

Stram, D. O. and Lee, J. W., 1994, Variance components testing in the longitudinal mixed effects model, Biometrics 50: 1171–1177.

Stram, D. O. and Lee, J. W., 1995, Corrections to "Variance components testing in the longitudinal mixed effects model" by Stram, D. O. and Lee, J. W.; 50: 1171–1177 (1994), Biometrics 51: 1196.

See Also

pval_simu

Examples

1
2
3
4
5
library(graphics)
library(stats)

sample_mixt <- rchisqmix(n=1000, s=3, q=3)
plot(density(sample_mixt))

TcGSA documentation built on Jan. 24, 2020, 1:07 a.m.