Burnett_Barr: Burnett and Barr Method for Nonparametric ANCOVA

View source: R/Burnet_Barr.r

Burnett_BarrR Documentation

Burnett and Barr Method for Nonparametric ANCOVA

Description

Implements the Burnett and Barr rank-based method for ANCOVA. This method is suitable for models with one response, one covariate, and one grouping variable.

Usage

Burnett_Barr(data, formula)

Arguments

data

A data frame containing the variables specified in the formula.

formula

An object of class "formula": a symbolic description of the model to be fitted. The structure should be 'response ~ covariate + group'.

Value

A list containing the following components:

regression_equation

The summary of the fitted linear model.

anova

The ANOVA table from the fitted model.

data

The original data frame with added columns for ranks.

References

Burnett TD, Barr DRJE, Measurement P. A nonparametric analogy of analysis of covariance. 1977;37(2):341-8.

Olejnik SF, Algina JJER. A review of nonparametric alternatives to analysis of covariance. 1985;9(1):51-83.

Examples

# 1. Create a sample data frame
data <- data.frame(
  group = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3),
  response = c(16, 60, 82, 126, 137, 44, 67, 87, 100, 142, 17, 28, 105, 149, 160),
  covariate1 = c(26, 10, 42, 49, 55, 21, 28, 5, 12, 58, 1, 19, 41, 48, 35)
)

# 2. Run the Burnett and Barr method
results <- Burnett_Barr(
  formula = response ~ covariate1 + group,
  data = data
)

# 3. View the results
print(results)
print(results$anova)


npANCOVA documentation built on Nov. 9, 2025, 5:06 p.m.