my_t.test: Statistics t test

Description Usage Arguments Value Examples

View source: R/my_t.test.R

Description

This function performs a t test given data and a hypothesis.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

Vector of numerics representing sample data.

alternative

String containing type of alternative hypothesis with one of the following values "two.sided", "less", or "greater".

mu

Numeric containing null hypothesis mean value.

Value

List containing "test_stat": the t statistic calculated, "df": the degrees of freedom, "alternative": the value of alternative, "p_val": the p-value calculated from the t test.

Examples

1
2
my_t.test(c(0.5, 0.6, 0, 1.5, 4), "two.sided", 2)
my_t.test(c(1.0, 1.0), "less", 0)

BenjaminLowry/project3package documentation built on March 21, 2021, 4:34 a.m.