Finds observed test statistic using treatment and control outcomes
Usage
find_test_stat(y, w, test_stat = NULL, fun = NULL)
Value
Observed test statistic (numeric)
Arguments
y
Vector of observed outcomes
w
Vector indicating treatment assignments
test_stat
Name of built in test statistic function. Provide
"diffmeans" for difference of means, "t" for t test, "paired-t" for paired
t test, and "cohens-d" for cohen's d test (optional)
fun
Test statistic function (optional)
Details
Assignments must be indicated in argument "w" using numeric 1 or 0.
One of either argument "test_stat" or "fun" must be specified.
Argument "fun" must take in two parameters (treated outcomes and
control outcomes) and returns a numeric test statistic value (scalar).