Learn R Programming

TreeOrderTests (version 0.1.0)

TreeMaxD: Maximum Difference Test for Tree Ordered Alternatives

Description

Computes a test statistic based on the maximum standardized difference between the treatment means and the control mean under the tree order restriction.

Usage

TreeMaxD(sample_data, significance_level, n.boot = 1e+05, seed = NULL)

Value

A character string with the critical value, the Max-D test statistic, and the test decision.

Arguments

sample_data

A list of numeric vectors. The first element represents the control group, the others represent treatment groups.

significance_level

A numeric value between 0 and 1 specifying the significance level for the test (e.g., 0.05).

n.boot

Number of bootstrap replications to estimate the critical value (default is 100000).

seed

Optional random seed for reproducibility.

Author

Subha Halder

Details

The test statistic is the maximum of standardized differences between each treatment mean and the control mean. The critical value is estimated by a bootstrap procedure.

See Also

Halder, Mondal, and Kumar (2025) "Testing Against Tree Ordered Alternatives in One-way ANOVA" <https://arxiv.org/abs/2507.17229>

Examples

Run this code
# Generate data
set.seed(456)
control <- rnorm(10, mean = 5)
treatment1 <- rnorm(10, mean = 6)
treatment2 <- rnorm(10, mean = 7)

sample_data <- list(control, treatment1, treatment2)

# Run MaxD test at 5% significance level
TreeMaxD(sample_data, 0.05, n.boot = 10000)

# \donttest{
TreeMaxD(sample_data, 0.05, n.boot = 100000)
# }

Run the code above in your browser using DataLab