critical_difference: Compute the Critical Difference Using SEM and SED

View source: R/critical_difference.R

critical_differenceR Documentation

Compute the Critical Difference Using SEM and SED

Description

Calculates the critical difference required to determine whether the difference between two test scores is statistically significant. This function computes the critical difference based on the test-retest reliability coefficient, the standard deviation of the test scores, and the desired confidence interval. It also returns the z-score, standard error of measurement (SEM), and standard error of difference (SED).

Usage

critical_difference(rtt, sd, ci)

Arguments

rtt

Numeric value between 0 and 1. The test-retest reliability coefficient of the test.

sd

Numeric value. The standard deviation of the test scores.

ci

Numeric value between 0 and 1. The desired confidence interval level (e.g., 0.95 for a 95% confidence interval).

Details

The function calculates the critical difference (CD) using the following steps:

  • Calculate the z-score (z) corresponding to the desired confidence interval:

    z = \text{qnorm}\left( \frac{1 - \text{ci}}{2}, \text{lower.tail} = FALSE \right)

  • Compute the standard error of measurement (SEM):

    \text{SEM} = \text{SD} \times \sqrt{1 - r_{tt}}

  • Compute the standard error of difference (SED):

    \text{SED} = \sqrt{2} \times \text{SEM}

  • Calculate the critical difference (CD):

    \text{CD} = z \times \text{SED}

This approach accounts for the reliability of the test and the desired level of confidence to determine if the difference between two scores is statistically significant.

Value

A list containing:

critical_difference

The critical difference value.

z

The z-score corresponding to the specified confidence interval.

standard_error_measurement

The standard error of measurement (SEM).

standard_error_difference

The standard error of difference (SED).

Examples

# Calculate the critical difference for rtt = 0.9, sd = 15, ci = 0.95
critical_difference(rtt = 0.9, sd = 15, ci = 0.95)


jazznbass/wmisc documentation built on Jan. 28, 2025, 11:13 p.m.