TwoSamplesMeans {SAP}R Documentation

Hypothesis tests for two means

Description

Tests for means of two independent or paired groups.

Usage

TwoSamplesMeans(
  x,
  y,
  var.equal = FALSE,
  H1 = "two.sided",
  xvar = NULL,
  yvar = NULL,
  paired = FALSE
)

Arguments

x

a numeric vector for the data of the first group.

y

a numeric vector for the data of the second group.

var.equal

a logical variable indicating whether to treat the two variances as being equal

H1

a character string specifying the alternative hypothesis, must be one of "two.sided" (default),

xvar

a numeric value for the variance of the first group

yvar

a numeric value for the variance of the second group

paired

a logical indicating value whether you want

Details

TwoSamplesMeans function performs hypothesis tests on means of independent or paired two groups. Moreover, this function can decide whether it will use a parametric or non-parametric test.

Value

a list with 3 elements:

statistic

the value of the test statistic

df

If it is available, the degree of freedom for the test statistic

p.value

the p-value for the test

test

a character string indicating which method was used

Author(s)

Hasan BULUT <hasan.bulut@omu.edu.tr>

Examples


x<-c(10, 25, 35, 40, 70, 60, 50, 70, 65, 25)
y<-c(30, 20, 60, 70, 50, 90, 80, 65, 75, 60)
TwoSamplesMeans(x = x,y = y,H1 = "two.sided")

[Package SAP version 1.0 Index]