my_t_test: T-test function

Description Usage Arguments Value Examples

View source: R/my_t_test.R

Description

This function performs a one sample t-test

Usage

1
my_t_test(x, alternative, mu)

Arguments

x

Numberic vector of data.

alternative

Character string specifying the alternative hypothesis. Only accept "two.sided", "less", or "greater".

mu

Numberic input indicating the null hypothesis value of the mean.

Value

List with elements:

test_stat

the numeric test statistic

df

the degrees of freedom

alternative

the value of the parameter alternative

p_val

the numeric p-value

Examples

1
my_t_test(7, "two.sided", 12)

jingnanyuan/STAT302package documentation built on April 2, 2020, 9:42 p.m.