apa.ind.t.test {apaText} | R Documentation |
Report descriptive statistics for a set of values
Description
Report descriptive statistics for a set of values
Usage
apa.ind.t.test(
.data,
.iv,
.dv,
bonferroni.multiplier = 1,
show.mean.difference = TRUE,
show.statistic = NULL,
show.conf.interval = NULL,
number.decimals = NULL,
number.decimals.p = NULL,
var.equal = TRUE,
one.sided = FALSE
)
Arguments
.data |
A data frame or data frame extension (e.g., tibble) |
.iv |
Name of the independent variable column (only 2 levels) |
.dv |
Name of the dependent variable column |
bonferroni.multiplier |
Multiply the p-value by this number to make a bonferroni adjustment |
show.mean.difference |
Show mean difference (Bool. Default TRUE) |
show.statistic |
Show t-value (Bool. Default TRUE) |
show.conf.interval |
Show CI for mean difference (Bool. Default TRUE) |
number.decimals |
Number of decimals used in output (excluding p-value) |
number.decimals.p |
Number of decimals used in p-value output |
var.equal |
(boolean) TRUE or FALSE for cell equal variances |
one.sided |
(boolean) TRUE or FALSE for conducting a one-sided test |
Value
R Markdown text
Examples
if (requireNamespace("apaTables", quietly = TRUE)){
library(dplyr)
goggles <- apaTables::goggles
# one-sided test
goggles %>%
filter(alcohol == "None") %>%
filter(gender == "Female" | gender == "Male") %>%
apa.ind.t.test(gender, attractiveness,
var.equal = TRUE, one.sided = TRUE)
#two-sided test
goggles %>%
filter(alcohol == "None") %>%
filter(gender == "Female" | gender == "Male") %>%
apa.ind.t.test(gender, attractiveness,
var.equal = TRUE, one.sided = FALSE)
#two-sided test with Bonferroni correction (three exploratory tests)
goggles %>%
filter(alcohol == "None") %>%
filter(gender == "Female" | gender == "Male") %>%
apa.ind.t.test(gender, attractiveness,
var.equal = TRUE, one.sided = FALSE,
bonferroni.multiplier = 3)
}
[Package apaText version 0.1.7 Index]