| anovaLR | R Documentation |
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.
anovaLR(X, Y)
X |
covariate matrix |
Y |
response vector |
p-value of the test
Other LR test:
maxLR()
n <- 50 p <- 20 X <- matrix(rnorm(n*p), nrow = n, ncol = p) Y <- rnorm(n) stat.anova <- anovaLR(X, Y)