Custom and stripped-down version of R's built-in t.test that yields the estimate with the confidence interval corresponding to the specified alpha level.
Usage
welch_t_test(
vals,
grps,
arms = unique(grps),
na_replacement = NULL,
alpha = 0.05
)
Arguments
- vals
numeric vector
- grps
character vector, allowed values are "ctrl" and "actv" and used to slice
x
into two vectors with values to be compared.- arms
character vector with the arms used in the
grps
parameter. The first value will be used as the comparator.- na_replacement
scalar (or
NULL
), ifNULL
missing values will be removed. Otherwise, missing values will be replaced by the value ofna_replacement
- alpha
numeric, 1.0 - confidence_level