# install.packages("here")
library(tidyverse)
library(modelsummary) # for summarizing data
Parallel, Tau-Equivalent, and Congeneric Tests
Parallel Tests
Here we simulate scores for two tests that are parallel:
set.seed(2237) # setting the seed ensure reproducibility
<- 1000 # number of respondents
num_person # True scores for Test 1
<- rnorm(num_person, mean = 20, sd = 5)
t1 # Error scores for Test 1
<- rnorm(num_person, mean = 0, sd = 2)
e1 # Observed scores for Test 1
<- t1 + e1
x1 # True scores for Test 2
<- t1 # parallel tests have equal true scores
t2 # Error scores for Test 2
<- rnorm(num_person, mean = 0, sd = 2)
e2 # Observed scores for Test 2
<- t2 + e2 x2
# Merge into a data frame
<- data.frame(x1, x2)
test_df # Get means and variances
<- datasummary(x1 + x2 ~ Mean + Var, data = test_df,
mv output = "data.frame")
# Correlation, adding means and variances
datasummary_correlation(test_df, add_columns = mv[-1])
x1 | x2 | Mean | Var | |
---|---|---|---|---|
x1 | 1 | . | 20.41 | 29.20 |
x2 | .87 | 1 | 20.31 | 30.27 |
Parallel Tests
- Means and Variances of observed scores are equal, theoretically
- Correlation = reliability
Parallel Tests
Here we simulate scores for two tests that are parallel:
set.seed(2237) # setting the seed ensure reproducibility
<- 1000 # number of respondents
num_person # True scores for Test 1
<- rnorm(num_person, mean = 20, sd = 5)
t1 # Error scores for Test 1
<- rnorm(num_person, mean = 0, sd = 2)
e1 # Observed scores for Test 1
<- t1 + e1
x1 # True scores for Test 2
<- t1 # parallel tests have equal true scores
t2 # Error scores for Test 2
<- rnorm(num_person, mean = 0, sd = 2)
e2 # Observed scores for Test 2
<- t2 + e2 x2
If we know the true scores, the reliability estimates for X1 and X2 are
# Reliability for x1
var(t1) / var(x1)
[1] 0.8784243
# Reliability for x2
var(t2) / var(x2)
[1] 0.8473518
# Merge into a data frame
<- data.frame(x1, x2)
test_df # Get means and variances
<- datasummary(x1 + x2 ~ Mean + Var, data = test_df,
mv output = "data.frame")
# Correlation, adding means and variances
datasummary_correlation(test_df, add_columns = mv[-1])
x1 | x2 | Mean | Var | |
---|---|---|---|---|
x1 | 1 | . | 20.41 | 29.20 |
x2 | .87 | 1 | 20.31 | 30.27 |
Parallel Tests
- Means and Variances of observed scores are equal, theoretically
- Correlation = reliability
Essentially Tau-Equivalent Tests
# True scores for Test 3
<- 5 + t1 # essentially tau-equivalent tests
t3 # Error scores for Test 3 (larger error SDs)
<- rnorm(num_person, mean = 0, sd = 4)
e3 # Observed scores for Test 2
<- t3 + e3 x3
# Merge into a data frame
<- data.frame(x1, x3)
test_df2 # Get means and variances
<- datasummary(x1 + x3 ~ Mean + Var, data = test_df2,
mv output = "data.frame")
# Correlation, adding means and variances
datasummary_correlation(test_df2, add_columns = mv[-1])
x1 | x3 | Mean | Var | |
---|---|---|---|---|
x1 | 1 | . | 20.41 | 29.20 |
x3 | .72 | 1 | 25.41 | 41.50 |
If we know the true scores, the reliability estimate for X3 is
# Reliability for x3
var(t3) / var(x3)
[1] 0.6180122
Essentially Tau-Equivalent Tests
- Means and Variances of observed scores are different
- Correlation \(\neq\) reliability
Congeneric Tests
# True scores for Test 4
<- 2 + 0.8 * t1
t4 # Error scores for Test 4 (larger error SDs)
<- rnorm(num_person, mean = 0, sd = 3)
e4 # Observed scores for Test 2
<- t4 + e4 x4
# Merge into a data frame
<- data.frame(x1, x4)
test_df3 # Get means and variances
<- datasummary(x1 + x4 ~ Mean + Var, data = test_df3,
mv output = "data.frame")
# Correlation, adding means and variances
datasummary_correlation(test_df3, add_columns = mv[-1])
x1 | x4 | Mean | Var | |
---|---|---|---|---|
x1 | 1 | . | 20.41 | 29.20 |
x4 | .73 | 1 | 18.27 | 24.23 |
If we know the true scores, the reliability estimate for X4 is
# Reliability for x4
var(t4) / var(x4)
[1] 0.6773983
Congeneric Tests
- Means and Variances of observed scores are different
- Correlation \(\neq\) reliability
- Need more than two tests to be disinguishable from essentially tau-equivalent tests