Description Usage Arguments Value Examples
Fulfill Welch Two Sample t-test (t.test
) and calculate Cohen's d as well as determine significance by p-value and effect size threshold.
1 2 | ttest_cohens_d(values, groups, alpha = 0.05, power = 0.9,
alternative = "two.sided", paired = FALSE, var.equal = FALSE)
|
values |
A scalar vector. Length of both of two vectors, values and groups, should be same. |
groups |
Experiment groups for the vector 'values'. Length of both of two vectors, values and groups, should be same. The number of groups is not limited to two, such as group <- c('A','A','A','B','B'). |
alpha |
P-value threshold |
power |
Give the statistical power you desired for output significant list |
alternative |
Choose one of these c("two.sided", "less", "greater"). Default is "two.sided". |
paired |
if two groups are paired, set it to TRUE. Default is FALSE. |
var.equal |
if two groups are assumed to have same variance, set it to TRUE. Default is FALSE. |
A list containing the followings:
observed_pvalue | Calculated P-value from T-test |
observed_cohens_d | Calculated Cohen's f |
threshold_cohens_d | Cohen's d threshold at the desired power |
threshold_pvalue | Desired p-value threshold |
flag_pvalue | TRUE=passed the pvalue threshold, FALSE=not |
flag_cohens_d | TRUE=passed the Cohen's d threshold, FALSE=not |
power_desired | Statistical power in you input parameters |
method | 'Welch Two Sample t-test' |
alternative | alternative option in you input parameters |
paired | paired option in you input parameters |
var.equal | var.equal option in you input parameters |
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.