my_t.test: T-test

Description Usage Arguments Value Examples

View source: R/my_t_test.R

Description

This function calculates P-value using the t-distribution hypothesis test.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

The numeric vector of data given to conduct the t-test. No default value.

alternative

The alternative hypothesis, a string of either "two.sided", "less", or "greater". Used to determine which t-test to conduct. No default value.

mu

The predicted mean, a numeric value to calculate the test statistic. No default value.

Value

A list of the t-value, the degrees of freedom, the alternative used, and the P-value.

Examples

1
my_t.test(c(1, 2, 2), alternative = "less", 3)

andreyrisukhin/STAT302package documentation built on Dec. 19, 2021, 3:34 a.m.