statsExpressions (version 0.3.1)

expr_anova_robust: Expression containing results from heteroscedastic one-way ANOVA for trimmed means

Description

Expression containing results from heteroscedastic one-way ANOVA for trimmed means

Usage

expr_anova_robust(
  data,
  x,
  y,
  paired = FALSE,
  tr = 0.1,
  nboot = 100,
  conf.level = 0.95,
  conf.type = "norm",
  k = 2,
  stat.title = NULL,
  messages = TRUE,
  ...
)

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.

paired

Logical that decides whether the experimental design is repeated measures/within-subjects or between-subjects. The default is FALSE.

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.

k

Number of digits after decimal point (should be an integer) (Default: k = 2).

stat.title

A character describing the test being run, which will be added as a prefix in the subtitle. The default is NULL. An example of a stat.title argument will be something like "Student's t-test: ".

messages

Decides whether messages references, notes, and warnings are to be displayed (Default: TRUE).

...

Currently ignored.

Value

For more details, see- https://indrajeetpatil.github.io/statsExpressions/articles/stats_details.html

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
# for reproducibility
set.seed(123)

# ------------------------ between-subjects -----------------------------

# going with the defaults
statsExpressions::expr_anova_robust(
  data = ggplot2::midwest,
  x = state,
  y = percbelowpoverty,
  paired = FALSE,
  nboot = 10
)

# changing defaults
expr_anova_robust(
  data = ggplot2::midwest,
  x = state,
  y = percollege,
  paired = FALSE,
  conf.level = 0.99,
  tr = 0.2,
  nboot = 10
)

# ------------------------ within-subjects -----------------------------

statsExpressions::expr_anova_robust(
  data = iris_long,
  x = condition,
  y = value,
  paired = TRUE,
  tr = 0.2,
  k = 3,
  nboot = 10
)
# }

Run the code above in your browser using DataLab