my_t.test: T-test

Description Usage Arguments Value Examples

View source: R/my_t.test.R

Description

This function performs a one-sample t-test on a numeric vector of input data.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

A numeric vector of data.

alternative

A character string specifying the alternative hypothesis. Only accepts input values of "two.sided", "less", or"greater".

mu

Numeric input indicating the null hypothesis value of the mean.

Value

A list with the following elements: "test_stat": the numeric test statistic, "df": the degrees of freedom, "alternative": the value of the parameter "alternative", and "p_val": the numeric p-value.

Examples

1
my_t.test(1:10000, alternative = "two.sided", mu = 4900)

adammcbroom/STAT302package documentation built on Dec. 18, 2021, 10:25 p.m.