myttest: A constructor function for t tests

View source: R/myttest.R

myttestR Documentation

A constructor function for t tests

Description

This function takes in two vectors of data, true/false of whether the data is paired, and an alpha value for the acceptable error It provides the confidence interval and p-value from a t-test.

Usage

myttest(x, y, paired = FALSE, alpha = 0.05)

Arguments

x

#vector of data

y

#vector of data

paired

#a boolean that shows whether the supplied data is paired. This value defaults to false.

alpha

#the alpha, a value between 0-1

Value

A named list with a dataframe of the data, confidence interval, and p-value

Examples

x <- rnorm(30,5,2); y <- rnorm(30,3,2)
obj <- myttest(x=x, y=y, paired=FALSE, alpha=0.05)

robert1hill/DSA5041 documentation built on May 8, 2022, 8:55 p.m.