Source: Hastie, Tibshirani and Friedman, The Elements of Statistical Learning (2nd
ed., 2009), section 3.2, equation (3.13): F = ((RSS0 - RSS1)/(p1 - p0)) /
(RSS1/(N - p1 - 1)), which under the Gaussian null is F(p1 - p0, N - p1 - 1).
Usage
Fnested(model0, model1, X, y)
Arguments
- model0, model1
Integer column indices of X in each
model, 1-based; model0 must be nested in model1. An
intercept is always added.
- X
Numeric matrix of predictors without an intercept column.
- y
Numeric response.
Value
list: statistic, p_value, df1, df2, rss0, rss1, p0, p1, n,
method.