randInterval {randomizationInference} | R Documentation |
Randomization-Based Null Interval
Description
Calculates randomization-based intervals under the null hypothesis for the specified test statistics and coverage levels.
Usage
randInterval(results, coverage = 0.95)
Arguments
results |
a resultant object of the |
coverage |
a number specifying the desired coverage level (defaults to |
Details
If multiple tests are conducted simultaneously, users should be wary of multiple comparisons and make adjustments accordingly (e.g., Bonferroni corrections).
Value
A randomization-based interval (or multiple intervals) for the test statistic(s) under the null hypothesis with the specified coverage level.
Author(s)
Joseph J. Lee and Tirthankar Dasgupta
See Also
Examples
# Completely randomized design example
# with one treatment factor at two levels
w <- c(rep(0, 5), rep(1, 5))
y <- rnorm(10, mean = 0, sd = 1)
# Two-sided test
twoSidedTest <- randTest(y, w, nrand = 50, calcTestStat = diffMeans)
randInterval(twoSidedTest)
# Reading comprehension pre- and post-test example
data(reading)
# Testing within-block pairwise effects
readingTest <- randTest(
y = reading$Diff1,
w = reading$Group,
nrand = 50,
calcTestStat = withinBlockEffects,
calcOptions = list(
block = reading$Block,
pairs = rbind(
c("Basal", "DRTA"),
c("Basal", "Strat"),
c("DRTA", "Strat"),
c("Basal", "DRTA"),
c("Basal", "Strat"),
c("DRTA", "Strat")
),
blockindex = c(rep(1, 3), rep(2, 3))
),
randOptions = list(type = "block", block = reading$Block)
)
randInterval(readingTest)
[Package randomizationInference version 1.0.4 Index]