welchT: Welch T-Test

Description Usage Arguments Details Value Examples

View source: R/welchT.R

Description

Computes a manual Welch T-test given two sample vectors

Usage

1
welchT(x, y)

Arguments

x

numeric vector representing sample 1

y

numeric vector representing sample 2

Details

Takes two numeric vectors x, y representing two samples. Computes a manual Welch T-test statistic and effective degrees of freedom

Value

2 named variables: t-statistic, effective degree of freedom

Examples

1
2
3
4
5
#using an example from class with data by Dr. McKay:
bp_df <- read.csv("https://jlucasmckay.bmi.emory.edu/global/bmi585/two_group_bp.csv")
group_a <- bp_df$bp[which(bp_df$group=='A')]
group_b <- bp_df$bp[which(bp_df$group=='B')]
welchT(group_a,group_b)

frankchien/bmi585flc documentation built on Dec. 20, 2021, 8:51 a.m.