library(equate)
scores_x <- read.csv("scores_x.csv")
scores_y <- read.csv("scores_y.csv")
scores_a <- read.csv("scores_a.csv")
scoresx <- c(67, 67, 85, 58, 76, 72, 77, 64, 103, 50, 78, 61, 86, 51, 57, 84, 96, 61, 97, 87, 89, 76, 74, 57, 62, 59, 63, 63, 66, 83, 81, 62, 76, 66, 99, 82, 92, 88, 81, 79, 100,52, 64, 62, 108,84, 69, 47, 37, 28)
scoresy <- c(83, 101, 73, 88, 92, 91, 83, 85, 67, 91, 85, 79, 99, 83, 87, 76, 88, 92, 84, 90, 86, 81, 87, 69, 78, 102, 90, 97, 87, 91, 81, 81, 108, 79, 91, 79, 94, 79, 80, 66, 88, 96, 74, 78, 75, 90, 90, 85, 82, 81)
scoresa <- c(80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 61, 62, 63, 64, 65, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 85, 86, 87, 88, 89)
freq_x <- freqtab(scoresx)
freq_y <- freqtab(scoresy)
freq_a <- freqtab(scoresa)
# Perform the equating
# type = "equipercentile" for the equating method
# method = "chained" for the non-equivalent groups design
# The function uses the anchor test to link the two groups
equated_result <- equate(x = freq_x, y = freq_y, anchor = scoresa,
type = "equipercentile")
# Get a summary of the results
summary(equated_result)
##
## Equipercentile Equating: freq_x to freq_y
##
## Design: equivalent groups
##
## Smoothing Method: none
##
## Summary Statistics:
## mean sd skew kurt min max n
## x.count 72.520 17.032 -0.135 2.735 28 108 50
## y.count 85.240 8.731 0.109 3.035 66 108 50
## yx.obs 85.238 8.730 0.112 3.033 66 108 50
# Plot the equating function
plot(equated_result)
