PPBMT {bootLRTpairwise} | R Documentation |
Pairwise Parametric Bootstrap Mean Test (PPBMT)
Description
Performs a parametric bootstrap test to compare all pairwise group means under heteroscedasticity, assuming normality of the data.
Usage
PPBMT(means, vars, ns, B = 1000, alpha = 0.05)
Arguments
means |
A numeric vector containing the sample means for each group. |
vars |
A numeric vector containing the sample variances for each group. |
ns |
An integer vector indicating the sample sizes of each group. |
B |
Number of bootstrap re-samples. Default is 1000. |
alpha |
Significance level for the hypothesis test. Default is 0.05. |
Value
A list of class "PPBMT"
containing:
test_statistic |
Observed value of the test statistic. |
critical_value |
Bootstrap-based critical value. |
decision |
Conclusion of the hypothesis test. |
Examples
# Example with 3 groups
set.seed(123)
g1 <- rnorm(20, mean = 5, sd = 1.5)
g2 <- rnorm(25, mean = 6.5, sd = 2)
g3 <- rnorm(22, mean = 7.2, sd = 2.5)
means <- c(mean(g1), mean(g2), mean(g3))
vars <- c(var(g1), var(g2), var(g3))
ns <- c(length(g1), length(g2), length(g3))
result <- PPBMT(means, vars, ns, B = 1000, alpha = 0.05)
print(result)
[Package bootLRTpairwise version 0.2.0 Index]