eq {lazy.tools}R Documentation

Observed Score Equating

Description

This performs the observed score equating of the test score 1 to the test score 2.

Usage

eq(
  score1,
  freq1,
  cdf1 = NULL,
  score2,
  freq2,
  cdf2 = NULL,
  lim1 = NULL,
  lim2 = NULL,
  smooth1 = 0,
  bandwid1 = 3,
  smooth2 = 0,
  bandwid2 = 3,
  method = 2,
  interpol_method = "linear",
  title = "",
  nolow = 0,
  round = 1,
  print = 1,
  plot = 1
)

Arguments

score1

a vector consisting of the score of test1

freq1

a vector consisting of the frequency counts at score1

cdf1

a vector consisting of the cumulative frequencies at score1

score2

a vector consisting of the score of test2

freq2

a vector consisting of the frequency counts at score2

cdf2

a vector consisting of the cumulative frequencies at score2

lim1

min and max score of test1

lim2

min and max score of test2

smooth1

# of times to smooth cdf1

bandwid1

bandwidth for running average smooth of cdf1

smooth2

# of times to smooth cdf2

bandwid2

bandwidth for running average smooth of cdf2

method

= 1 to use linear equating
= 2 to use equi-percentile equating

interpol_method

= "constant", "linear" or "spline"

title

title string

nolow

= 1 to avoid lowering scores

round

= 0 not to round the result to integer. (not yet available)

print

= 1 to print the result

plot

= 1 to plot the conversion table
= 2 to plot the cdf
= 3 to plot the smoothed cdf

Details

Equipercentile equating of test1 score x1 to test2 score x2 is defined as

 x21 = invF2( F1(x1) )

where F1 is the distribution function of x1 and invF2 is the inverse of the distribution function of x2. In this function, invF2 is calculated by interpolating ( F2(x2), x2 ) at F1(x1) with or without smoothing.

Equipercentile equating is essentially the same as native qqplot.
Therefore, the following two codes produce similar results:

 eq( score1=score1, freq1=freq1, score2=score2, freq2=freq2 )
 qqplot( expand_freqdist( score1, freq1 )
             , expand_freqdist( score2, freq2 ), type="l" )

Note that, since native qqplot cannot handle case weight, lazy.tools::expand_freqdist is used to recover the raw data from frequency table.

cdf has priority over freq.

Value

a list of the following:
ctable: the conversion table consisting of (score, score21, freq1)
mands: the summary stat of the converted score dist: (score21,freq1)
newfreq: the frequency distribution of the converted score (score21, freq21)
sdist1 and sdist2: input and smoothed score distributions
cntr: a list of control parameters used.

ctable shows that test score score1[i] of test1 is equivalent to test score score21[i] of test2.

Examples


seed <- 1701
set.seed(seed)

scoredist1 <- gen_test_score( 500, 0,10, beta=c(2,4), plot=1 )
scoredist2 <- gen_test_score( 1000, 0,15, beta=c(4,2), plot=1 )
reseq <- eq( score1=scoredist1[,1], freq1=scoredist1[,2]
           , score2=scoredist2[,1], freq2=scoredist2[,2]
           , smooth1=3, smooth2=3, method=2, plot=3 )


[Package lazy.tools version 0.1.6 ]