Learn R Programming

equate (version 0.1-0)

freqbump: Frequency Adjustment

Description

This function smooths a frequency distribution by adding a small relative frequency to each score while adjusting the probabilities to sum to one (see Kolen & Brennan, 2004, p. 48).

Usage

freqbump(x, jmin = 10^-6, Kx = length(x))

Arguments

x
vector of either counts (summing to the number of examinees) or probabilities (summing to 1)
jmin
the frequency to be added to each score point (default is 10^-6)
Kx
integer indicating the number of items in the scale (default is length(x))

Value

  • Returns a vector of adjusted relative frequencies (probabilities)

Details

If x does not sum to one it is assumed to be a vector of counts and it is converted to probabilities.

References

Kolen, M. J., & Brennan, R. L. (2004) Test Equating, Scaling, and Linking. (2nd ed.), New York: Springer.

See Also

freqtab, freqavg

Examples

Run this code
# generic frequency table:
set.seed(2005)
x <- round(rnorm(1000,100,10))
xscale <- 70:130
xtab <- freqtab(x,xscale)

# compare freqbump to freqavg:
xbump <- freqbump(xtab[,2])
xavg <- freqavg(xtab)
cbind(xtab,bump=round(xbump*sum(xtab[,2]),6),avg=xavg[,3])

Run the code above in your browser using DataLab