my_t.test: My t-Test

Description Usage Arguments Value Examples

View source: R/my_t_test.R

Description

This function performs a one sample t-test on vectors of data.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

Numeric vector input of data

alternative

A character string specifying the alternative hypothesis. It only accepts "two.sided", "less", or "greater".

mu

A number indicating the null hypothesis value of the mean.

Value

a list with elements test_stat, the numeric test statistics, df, the degrees of freedom, alternative, the value of the parameter alternative, and p_val, the numeric p-value.

Examples

1
2
my_t.test(1:10, alternative = "two.sided", mu = 5)
my_t.test(3:1000, alternative = "less", mu = 100)

hugoliao330/stat302util documentation built on March 18, 2020, 12:12 a.m.