Learn R Programming

volker (version 3.2.0)

effect_metrics_items: Test whether a distribution is normal for each item

Description

The test is calculated using stats::shapiro.test.

Usage

effect_metrics_items(
  data,
  cols,
  adjust = "fdr",
  labels = TRUE,
  clean = TRUE,
  ...
)

Value

A volker table containing itemwise statistics:

  • skewness: Measure of asymmetry in the distribution. A value of 0 indicates perfect symmetry.

  • kurtosis: Measure of the "tailedness" of the distribution.

  • W: W-statistic from the Shapiro-Wilk normality test.

  • p: p-value for the statistical test.

  • stars: Significance stars based on p-value (*, **, ***).

  • normality: Interpretation of normality based on Shapiro-Wilk test.

Arguments

data

A tibble containing item measures.

cols

The column holding metric values.

adjust

Performing multiple significance tests inflates the alpha error. Thus, p values need to be adjusted according to the number of tests. Set a method supported by stats::p.adjust, e.g. "fdr" (the default) or "bonferroni". Disable adjustment with FALSE.

labels

If TRUE (default) extracts labels from the attributes, see codebook.

clean

Prepare data by data_clean.

...

Placeholder to allow calling the method with unused parameters from effect_metrics.

Examples

Run this code
library(volker)
data <- volker::chatgpt

effect_metrics_items(data, starts_with("cg_adoption"))


Run the code above in your browser using DataLab