statsExpressions (version 0.3.1)

yuend_ci: Paired samples robust t-tests with confidence interval for effect size.

Description

Custom function to get confidence intervals for effect size measure for paired samples robust t-tests.

Usage

yuend_ci(
  data,
  x,
  y,
  tr = 0.1,
  nboot = 100,
  conf.level = 0.95,
  conf.type = "norm",
  ...
)

Arguments

data

A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will not be accepted.

x

The grouping variable from the dataframe data.

y

The response (a.k.a. outcome or dependent) variable from the dataframe data.

tr

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.

nboot

Number of bootstrap samples for computing confidence interval for the effect size (Default: 100).

conf.level

Scalar between 0 and 1. If unspecified, the defaults return 95% lower and upper confidence intervals (0.95).

conf.type

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.

...

Currently ignored.

Examples

Run this code
# NOT RUN {
# for reproducibility
set.seed(123)
# }
# NOT RUN {
statsExpressions:::yuend_ci(
  data = dplyr::filter(
    .data = statsExpressions::iris_long,
    condition %in% c("Sepal.Length", "Petal.Length")
  ),
  x = condition,
  y = value,
  nboot = 50,
  tr = 0.2
)
# }

Run the code above in your browser using DataLab