myttest: A function for t tests

Description Usage Arguments Details Value Examples

View source: R/myttest.R

Description

The constructor function is based on t-test, that evaluates the NUll hypothesis H0. H0 (The Null Hypothesis) claims that two populations have the same mean.

Usage

1
myttest(x, y, paired = FALSE, alpha = 0.05)

Arguments

x

vector of sample data from population 1

y

vector of sample data from population 2

paired

TRUE or FALSE, paired = FALSE by default The samples are paired = TRUE, if each experimental unit is measured twice. In that case the first experiments creates sample x, and the second experiment creates sample y. The two-sided t-test is used for paired sapmles.

The test returns an error if the samples have different size.

alpha

alpha level is always between 0,1, which determines the confidence interval for the P-value.

Details

x and y have underlying normal distribution.

Value

The test return a list containing the data, and t test object.

Examples

1
myttest(x = rnorm(30,10,12), y = rnorm(40, 7, 10))

ElahehJafarigol/R.Package.Stat documentation built on April 29, 2020, 12:25 a.m.