| Burnett_Barr | R Documentation |
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.
Burnett_Barr(data, formula)
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'. |
A list containing the following components:
The summary of the fitted linear model.
The ANOVA table from the fitted model.
The original data frame with added columns for ranks.
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.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.