extra_SS: Conduct the Generalized F Test

View source: R/operations.R

extra_SSR Documentation

Conduct the Generalized F Test

Description

Conduct the Generalized F Test

Usage

extra_SS(
  X,
  Y,
  reduced_betas,
  full_betas,
  n = NROW(Y),
  p = NCOL(X),
  intercept_fitted = TRUE,
  alpha = 0.05
)

Arguments

X

An n \times m design matrix, optionally with an intercept column present.

Y

An n-length vector or n \times 1 matrix representing the response.

reduced_betas

Vector of indices of beta coefficients for the reduced model, indexed from zero for β_0, 1 for β_1, etc.

full_betas

Vector of indices of beta coefficients for the full model, indexed the same way.

n

Number of rows in the design matrix.

p

Number of columns in the design matrix.

intercept_fitted

Logical. Was an intercept included in the model? Default TRUE.

alpha

Alpha level of the significance test.

Details

This function conducts the generalized F test comparing a model with q parameters to one with p parameters. The extra degrees of freedom are therefore q-p, where q -p ≥q 1.

Value

F statistic of the test.


ryan-heslin/RegLesson documentation built on Aug. 5, 2022, 9:03 p.m.