Learn R Programming

kernelPSI (version 1.1.1)

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

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

anovaLR(X, Y)

Arguments

X

covariate matrix

Y

response vector

Value

\(p\)-value of the test

See Also

Other LR test: maxLR()

Examples

Run this code
# NOT RUN {
n <- 50
p <- 20
X <- matrix(rnorm(n*p), nrow = n, ncol = p)
Y <- rnorm(n)
stat.anova <- anovaLR(X, Y)

# }

Run the code above in your browser using DataLab