statsExpressions (version 0.3.1)

expr_anova_parametric: Making expression containing parametric ANOVA results

Description

Making expression containing parametric ANOVA results

Usage

expr_anova_parametric(
  data,
  x,
  y,
  paired = FALSE,
  effsize.type = "unbiased",
  partial = TRUE,
  conf.level = 0.95,
  nboot = 100,
  var.equal = FALSE,
  sphericity.correction = TRUE,
  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.

effsize.type

Type of effect size needed for parametric tests. The argument can be "biased" (equivalent to "d" for Cohen's d for t-test; "partial_eta" for partial eta-squared for anova) or "unbiased" (equivalent to "g" Hedge's g for t-test; "partial_omega" for partial omega-squared for anova)).

partial

Logical that decides if partial eta-squared or omega-squared are returned (Default: TRUE). If FALSE, eta-squared or omega-squared will be returned. Valid only for objects of class lm, aov, anova, or aovlist.

conf.level

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

nboot

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

var.equal

a logical variable indicating whether to treat the variances in the samples as equal. If TRUE, then a simple F test for the equality of means in a one-way analysis of variance is performed. If FALSE, an approximate method of Welch (1951) is used, which generalizes the commonly known 2-sample Welch test to the case of arbitrarily many samples.

sphericity.correction

Logical that decides whether to apply correction to account for violation of sphericity in a repeated measures design ANOVA (Default: TRUE).

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).

...

Additional arguments (currently ignored).

Value

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

Examples

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

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

# with defaults
statsExpressions::expr_anova_parametric(
  data = ggplot2::msleep,
  x = vore,
  y = sleep_rem,
  paired = FALSE,
  k = 3
)

# modifying the defaults
statsExpressions::expr_anova_parametric(
  data = ggplot2::msleep,
  x = vore,
  y = sleep_rem,
  paired = FALSE,
  effsize.type = "biased",
  partial = FALSE,
  var.equal = TRUE,
  nboot = 10
)

# -------------------- repeated measures ------------------------------

statsExpressions::expr_anova_parametric(
  data = iris_long,
  x = condition,
  y = value,
  paired = TRUE,
  k = 4,
  nboot = 10
)
# }

Run the code above in your browser using DataCamp Workspace