View source: R/critical_difference.R
critical_difference | R Documentation |
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).
critical_difference(rtt, sd, ci)
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). |
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.
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).
# Calculate the critical difference for rtt = 0.9, sd = 15, ci = 0.95
critical_difference(rtt = 0.9, sd = 15, ci = 0.95)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.