View source: R/Kernel Equating Functions.R
PEN1 | R Documentation |
This function calculates the penalty term for a given bandwidth against a given distribution. The definition of PEN1 can be found in Liang and von Davier (2014). The values of PEN1 are not of much interest in their own right. Finding the bandwidth that minimises this penalty (using optPEN1) can potentially be useful as identifying a plausible bandwidth to use in subsequent kernel equating.
PEN1(h, scores, fX)
h |
Bandwith being considered. |
scores |
Vector of possible scores. |
fX |
Number of people achieving each score (weighted numbers, probabilities or proportions also acceptable). Must be same length as scores. |
The function returns the value of PEN1 for the given bandwidth.
Liang, T., & von Davier, A. A. (2014). Cross-validation: An alternative bandwidth-selection method in kernel equating. Applied Psychological Measurement, 38(4), 281-295.
x1=rowSums(mathsdata)#make some scores
tab=tabulate(x1+1)#count how many people got each integer score
cbind(0:max(x1),tab)#look at the table
PEN1(0.5,0:max(x1),tab)#calculate PEN1 for a given bandwidth
optPEN1(0:max(x1),tab)#optimise PEN1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.