anovaLR: implements a scaled variant of the maximum likelihood ratio...

Description Usage Arguments Value See Also Examples

View source: R/likelihood.R

Description

Compared to maxLR, the residual sum of squares (RSS) is scaled by the degrees of freedom of the model df = n - k, where n is the number of samples and k is the number of covariates. In maxLR, the RSS is instead averaged over n. Both estimators are asymptotically equivalent, with minor differences for finite samples. Further details in this link.

Usage

1
anovaLR(X, Y)

Arguments

X

covariate matrix

Y

response vector

Value

p-value of the test

See Also

Other LR test: maxLR()

Examples

1
2
3
4
5
n <- 50
p <- 20
X <- matrix(rnorm(n*p), nrow = n, ncol = p)
Y <- rnorm(n)
stat.anova <- anovaLR(X, Y)

kernelPSI documentation built on Dec. 8, 2019, 1:07 a.m.