two.sample.t.test: Welch's two-sample t-test with summary statistics

View source: R/tests.R

two.sample.t.testR Documentation

Welch's two-sample t-test with summary statistics

Description

Welch's two-sample t-test for testing claims about the different between two population means without assuming the population variances are equal.

Usage

two.sample.t.test(
  xbar,
  ybar,
  sx,
  sy,
  nx,
  ny,
  null.diff = 0,
  alternative = c("two.sided", "less", "greater"),
  var.equal = FALSE,
  conf.level = 0.95
)

Arguments

xbar

the sample mean of the first sample.

ybar

the sample mean of the second sample.

sx

the sample standard deviation of the first sample.

sy

the sample standard deviation of the second sample.

nx

the sample size of the first sample.

ny

the sample size of the second sample.

null.diff

the assumed difference mu_X - mu_Y under the null hypothesis.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

var.equal

a logical variable indicating whether to treat the two variances as being equal. If TRUE then the pooled variance is used to estimate the variance otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used.

conf.level

confidence level for the interval estimator


ddarmon/MUsaic documentation built on June 19, 2024, 6:43 p.m.