brown_forsythe: Conduct the Brown-Forsythe Test of Equal Variances on...

View source: R/operations.R

brown_forsytheR Documentation

Conduct the Brown-Forsythe Test of Equal Variances on Residuals

Description

Conduct the Brown-Forsythe Test of Equal Variances on Residuals

Usage

brown_forsythe(
  resid,
  groups = resid <= stats::median(resid),
  n = NROW(resid),
  p,
  alpha = 0.05
)

Arguments

resid

vector of model residuals.

groups

Factor or logical of the same length as resid denoting groups into which to split the residuals. Defaults to a logical vector indicating whether each residual is below the median residual.

n

Number of rows in the design matrix.

p

Number of columns in the design matrix..

alpha

Alpha level for the significance test.

Details

This function performs the Brown-Forsythe test of equal variance on specified groups of model residuals. A significant result provides evidence of unequal variances.

Value

Value of the Brown-Forsythe statistic.


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