Description Usage Arguments Value See Also Examples
View source: R/tadaa_two_sample.R
An extension for stats::t.test with added boni and tidy and/or pretty output.
The result is either returned as a broom::tidy data.frame
or prettified using
various pixiedust::sprinkle shenanigans.
1 2 3 4 5 6 7 8 9 10 |
data |
A |
response |
The response variable (dependent). |
group |
The group variable, usually a |
direction |
Test direction, like |
paired |
If |
var.equal |
If set, passed to stats::t.test to decide whether to use a
Welch-correction. Default is |
conf.level |
Confidence level used for power and CI, default is |
print |
Print method, default |
A data.frame
by default, otherwise dust
object,
depending on print
.
Other Tadaa-functions:
tadaa_aov()
,
tadaa_chisq()
,
tadaa_kruskal()
,
tadaa_levene()
,
tadaa_nom()
,
tadaa_one_sample()
,
tadaa_ord()
,
tadaa_pairwise_tukey()
,
tadaa_pairwise_t()
,
tadaa_wilcoxon()
1 2 3 4 5 6 7 8 | set.seed(42)
df <- data.frame(x = runif(100), y = sample(c("A", "B"), 100, TRUE))
tadaa_t.test(df, x, y)
df <- data.frame(x = runif(100), y = c(rep("A", 50), rep("B", 50)))
tadaa_t.test(df, x, y, paired = TRUE)
tadaa_t.test(ngo, deutsch, geschl, print = "console")
|
# A tibble: 1 x 13
estimate estimate1 estimate2 statistic se parameter conf.low conf.high
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 -0.0512 0.496 0.547 -0.841 0.0609 98 -0.172 0.0696
# ... with 5 more variables: p.value <dbl>, d <dbl>, power <dbl>, method <chr>,
# alternative <chr>
# A tibble: 1 x 13
estimate estimate1 estimate2 statistic se parameter conf.low conf.high
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 0.0326 0.457 0.424 0.485 0.0671 49 -0.102 0.167
# ... with 5 more variables: p.value <dbl>, d <dbl>, power <dbl>, method <chr>,
# alternative <chr>
Table 1: **Two Sample t-test** with alternative hypothesis: $\mu_1 \neq \mu_2$
Diff $\\mu_1$ M<U+00E4>nnlich $\\mu_2$ Weiblich t SE df
1 -1.03 7.09 8.12 -4.11 0.25 248
$CI_{95\\%}$ p Cohen\\'s d Power
1 (-1.53 - -0.54) < .001 -0.52 0.98
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.