Perform a two-tailed t-test between two variables

t_test(x, y, variance_equal = TRUE, ...)

Arguments

x

a numeric vector

y

a numeric vector

variance_equal

boolean (TRUE/FALSE) indicating if variance of x and y are equal or not. If variances are equal, the function will calculate the pooled variance. Else, it will use the formula for unequal variances.

...

optional named arguments. You may pass the following arguments:

  • R: integer indicating the number of bootstrap samples used to estimate the confidence intervals. Defaults to 1.000.

  • boostrap_ssize: float between 0 and 1 exclusive indicating the sample size to be used for the bootstrap samples. A value of 1 means that you use the entire sample. A value of 0 means that you use no observations. Defaults to 0.5

Value

list of class 't_test' containing:

  • inputs: list containing input variables and optional arguments

  • summary_statistics: list containing summary statistics means, variance, number of observations, pooled variance (if applicable)

  • test: test statistic, degrees of freedom, p-value

  • CI: 95% bootstrapped confidence intervals, the average test statistic and bias compared to the computed t-statistic found under 'test'