corrected_t_test: One- and Two-Sample t-Tests with Corrected Default Degrees of...

View source: R/corrected_t_test.R

corrected_t_testR Documentation

One- and Two-Sample t-Tests with Corrected Default Degrees of Freedom

Description

Performs one-sample, paired, pooled two-sample, or unequal-variance two-sample t-tests. The corrected Welch-Satterthwaite calculation is the default for the unequal-variance two-sample case.

Usage

corrected_t_test(x, y = NULL, alternative = c("two.sided", "less", "greater"),
  mu = 0, paired = FALSE, var.equal = FALSE, conf.level = 0.95,
  method = c("corrected", "classical"))

Arguments

x

Numeric vector of observations.

y

Optional numeric vector for a two-sample or paired test.

alternative

Alternative hypothesis: "two.sided", "less", or "greater".

mu

Null mean or null difference in means.

paired

Logical; perform a paired test when TRUE.

var.equal

Logical; use the pooled-variance test for an independent two-sample test.

conf.level

Confidence level for the interval.

method

"corrected" by default, or "classical" for the usual Welch-Satterthwaite calculation.

Value

An object of class "htest".

Examples

corrected_t_test(1:10, y = 2:11)
corrected_t_test(1:10, y = 2:11, method = "classical")

correctedWS documentation built on Nov. 23, 2026, 5:08 p.m.