Crosstab51x11: Create 51x11 crosstab for test by anchor scores

View source: R/NN equating functions.R

Crosstab51x11R Documentation

Create 51x11 crosstab for test by anchor scores

Description

Regardless of the maximum scores available on each test form, it is necessary to reduce the relationship into and matrix of 51 rows and 11 columns in order to feed this into the experimental equating methods using neural networks. This step is completed by this function. If the test is out of 50 and the anchor out of 10 then this function will give very similar results to table(dx$x,dx$a). However, if the total differ from this the data will be squeezed into the correct shape. In particular, if the anchor test has a maximum greater than 10 then the scores will be replaced by categorizations into 11th (0-10) for the purposes of the crosstab. If the maximum test score differs from 50 then the score range will be broken into 51 equally sized sections and the crosstab will denote the extent of the continuized distribution within each of these ranges. (Continuization is done using the same principles as kernel equating and with a bandwidth of 0.4).

Usage

Crosstab51x11(dx, maxx = NA, maxa = NA)

Arguments

dx

Data frame with variables "x" and "a" representing scores for individual candidates on form X and on the anchor test.

maxx

Maximum score available on form X (calculated from the data by default).

maxa

Maximum score available on anchor test (calculated from the data by default).

Details

Note that for this function it is assumed that all scores are integers.

Examples

#example simulate a test and an anchor test
n1=1000
t1=rnorm(n1,0.5,1)
dx=data.frame(x=round(pmin(50,pmax(0,25+10*(0.9*t1+rnorm(n1,0,sqrt(1-0.9^2))))))
	,a=round(pmin(10,pmax(0,5+2*(0.7*t1+rnorm(n1,0,sqrt(1-0.7^2)))))))
crosstab1=Crosstab51x11(dx)
dim(crosstab1)
sum(crosstab1)
#display matrix as a heatmap
image(1:ncol(crosstab1), 1:nrow(crosstab1),t(crosstab1), col = terrain.colors(60), axes = FALSE)
axis(1, 1:ncol(crosstab1),0:(ncol(crosstab1)-1))
axis(2, 1:nrow(crosstab1),0:(nrow(crosstab1)-1))

CambridgeAssessmentResearch/KernEqWPS documentation built on Feb. 23, 2024, 9:34 p.m.