PB_LRT {bootLRTpairwise}R Documentation

Parametric Bootstrap Likelihood Ratio Test (PB_LRT)

Description

Performs a parametric bootstrap likelihood ratio test for comparing group means under heteroscedasticity (unequal variances). This test serves as a robust alternative to classical one-way ANOVA when the assumption of equal variances is violated.

Usage

PB_LRT(means, vars, ns, tol = 1e-05, H = 1000, alpha = 0.05)

Arguments

means

A numeric vector of group sample means.

vars

A numeric vector of group sample variances.

ns

A numeric vector of group sample sizes.

tol

Convergence tolerance for iterative re-estimation under the null hypothesis. Default is 1e-5.

H

Number of bootstrap iterations. Default is 1000.

alpha

Significance level for the hypothesis test. Default is 0.05.

Value

A list of class "PB_LRT" containing:

test_statistic

Observed value of the likelihood ratio statistic.

critical_value

Bootstrap-based critical value under the null hypothesis.

decision

Conclusion of the hypothesis test.

Examples

# Example with 3 groups
set.seed(123)
means <- c(5.1, 6.3, 7.0)
vars <- c(1.2, 1.8, 2.5)
ns <- c(20, 25, 22)
result <- PB_LRT(means, vars, ns)
print(result)


[Package bootLRTpairwise version 0.2.0 Index]