Type: Package
Title: Tests for Tree Ordered Alternatives in One-Way ANOVA
Version: 0.1.0
Description: Implements a likelihood ratio test and two pairwise standardized mean difference tests for testing equality of means against tree ordered alternatives in one-way ANOVA. The null hypothesis assumes all group means are equal, while the alternative assumes the control mean is less than or equal to each treatment mean with at least one strict inequality. Inputs are a list of numeric vectors (groups) and a significance level; outputs include the test statistic, critical value, and decision. Methods described in "Testing Against Tree Ordered Alternatives in One-way ANOVA" <doi:10.48550/arXiv.2507.17229>.
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.1
NeedsCompilation: no
Packaged: 2025-07-24 08:17:11 UTC; Subha Halder
Author: Subha Halder [aut, cre]
Maintainer: Subha Halder <sb.halder123456@gmail.com>
Repository: CRAN
Date/Publication: 2025-07-25 15:50:09 UTC

Likelihood Ratio Test for Tree Ordered Alternatives

Description

Performs a likelihood ratio test for testing the equality of means against tree ordered alternatives.

Usage

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

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.

Details

This test compares the null hypothesis of equal means for all groups to the alternative that the control group mean is less than or equal to the treatment group means under the tree order restriction.

The likelihood ratio statistic is computed using constrained maximum likelihood estimates under the null and tree ordered alternative hypotheses. The critical value is estimated by a bootstrap procedure.

Value

A character string with the critical value, the LRT test statistic, and the test decision.

Author(s)

Subha Halder

See Also

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

Examples

# 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 LRT at 5% significance level
TreeLRT(sample_data, 0.05, n.boot = 1000)


TreeLRT(sample_data, 0.05, n.boot = 100000)


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)

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.

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.

Value

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

Author(s)

Subha Halder

See Also

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

Examples

# 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)


TreeMaxD(sample_data, 0.05, n.boot = 100000)


Minimum Difference Test for Tree Ordered Alternatives

Description

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

Usage

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

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.

Details

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

Value

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

Author(s)

Subha Halder

See Also

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

Examples

# 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 MinD test at 5% significance level
TreeMinD(sample_data, 0.05, n.boot = 10000)


TreeMinD(sample_data, 0.05, n.boot = 100000)