Making text subtitle for the robust t-test (between- and within-subjects designs).
subtitle_t_robust(data, x, y, tr = 0.1, paired = FALSE, nboot = 100,
conf.level = 0.95, conf.type = "norm", k = 2, messages = TRUE,
...)
Dataframe from which variables specified are preferentially to be taken.
The grouping variable.
The response - a vector of length the number of rows of x
.
Trim level for the mean when carrying out robust
tests. If you
get error stating "Standard error cannot be computed because of Winsorized
variance of 0 (e.g., due to ties). Try to decrease the trimming level.",
try to play around with the value of tr
, which is by default set to
0.1
. Lowering the value might help.
a logical indicating whether you want a paired t-test.
Number of bootstrap samples for computing effect size (Default:
100
).
A scalar value between 0 and 1. If unspecified, the
default is to return 95%
lower and upper confidence intervals (0.95
).
A vector of character strings representing the type of
intervals required. The value should be any subset of the values "norm"
,
"basic"
, "perc"
, "bca"
. For more, see ?boot::boot.ci
.
Number of digits after decimal point (should be an integer)
(Default: k = 2
).
Decides whether messages references, notes, and warnings are
to be displayed (Default: TRUE
).
Additional arguments (ignored).
# NOT RUN {
# with defaults
subtitle_t_robust(
data = sleep,
x = group,
y = extra
)
# changing defaults
subtitle_t_robust(
data = ToothGrowth,
x = supp,
y = len,
nboot = 10,
k = 1,
tr = 0.2
)
# within-subjects design
ggstatsplot::subtitle_t_robust(
data = dplyr::filter(
ggstatsplot::intent_morality,
condition %in% c("accidental", "attempted"),
harm == "Poisoning"
),
x = condition,
y = rating,
paired = TRUE,
nboot = 25
)
# }
Run the code above in your browser using DataLab