cordata: Correlation and Cohen's d effect sizes.

View source: R/cordata.R

cordataR Documentation

Correlation and Cohen's d effect sizes.

Description

This function calculates the correlation for the data and Cohen's d effect sizes, both based on pooled and on treatment standard deviations. It can optionally display the results in an HTML widget.

Usage

cordata(Before, After, within = TRUE, data = NULL)

Arguments

Before

a numeric vector giving the data values for the first (before) measure.

After

a numeric vector giving the data values for the second (after) measure.

within

A logical indicating whether the effect sizes should be computed based on paired samples (TRUE, default) or independent samples (FALSE).

data

an optional data frame containing the variables in the formula. By default the variables are taken from environment (formula).

Details

This function computes the correlation between two measures and calculates Cohen's d effect sizes using both pooled and treatment standard deviations.

- If within = TRUE, the effect sizes are computed assuming paired samples. - If within = FALSE, the effect sizes are computed assuming independent samples.

The results are returned as a data frame and also displayed in an HTML widget in the RStudio Viewer or default web browser.

Value

Return a table containing the correlation, effect size pooled and effect size based on treatment.

Author(s)

Daniela Recchia, Thomas Ostermann.

References

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). New York:Academic Press.

See Also

cohen.d,cor

Examples

cordata("Before","After",data=language_test)

regtomean documentation built on April 4, 2025, 2:08 a.m.