boot_test: Bootstrap_t test for two-sample comparisons

View source: R/functions.R

boot_testR Documentation

Bootstrap_t test for two-sample comparisons

Description

This function provides bootstrap approximation to the sampling distribution of the the Welch's t-statistic

Usage

boot_test(x1, x2, B = 1000, alternative = "greater")

Arguments

x1

the first sample.

x2

the second sample.

B

number of resampling rounds. Default value is 1000.

alternative

the alternative hypothesis: "greater" for upper-tailed, "less" for lower-tailed, and "two.sided" for two-sided alternative.

Value

the p-value of the bootstrap_t test.

Examples

x1 <- rnorm(100, 0, 1)
x2 <- rnorm(100, 0.5, 2)
boot_test(x1, x2)

HuaiyuZhang/tcftt documentation built on July 9, 2023, 2:52 a.m.