bf_test: Calculates the Brown-Forsythe test.

View source: R/bf_test.R

bf_testR Documentation

Calculates the Brown-Forsythe test.

Description

bf_test Calculates the Brown-Forsythe test for homogeneity of variance across groups, coefficients, variance-covariance matrix, and degrees of freedom.

Usage

bf_test(y, x, formula, data)

Arguments

y

numeric response variable.

x

categorical variable.

formula

A formula object to specify the model as normally used by glm. Use 'factor' to define the grouping variable.

data

An objects of class milist, created by df2milist, list2milist or mids2milist.

Details

The Levene's test centers around means to calculate outcome residuals, the Brown-Forsythe test around the median.

Value

An object containing:

  • fstats F-test value, including numerator and denominator degrees of freedom.

  • qhat pooled coefficients from fit.

  • vcov variance-covariance matrix.

  • dfcom degrees of freedom obtained from df.residual.

Author(s)

Martijn Heymans, 2021

See Also

with.milist

Examples


imp_dat <- df2milist(lbpmilr, impvar="Impnr")
ra <- with(imp_dat, expr=bf_test(Pain ~ factor(Carrying)))


miceafter documentation built on Oct. 2, 2022, 5:08 p.m.