# PREp: Percent Relative Error In kequate: The Kernel Method of Test Equating

## Description

Calculates the percent relative error (PRE) between an equated distribution and the reference distribution for the first ten moments.

## Usage

 `1` ```PREp(eq, obs, r, s) ```

## Arguments

 `eq` A numeric vector containing the equated values from X to Y or Y to X. `obs` The score vector of test Y or X. `r` A vector of probabilities corresponding to the equated values. `s` A vector of probabilities corresponding to the score values of test Y or X.

## Details

If we equate test X to test Y, then we have equated values eYx with estimated probabilities r and estimated probabilities s for the score values on Y. To compare the moments between these two distributions, we can calculate the percent relative error (PRE) between them. If we denote the p:th moment of Y and eYx by μ(Y) and μ(eYx) respectively, the PRE for moment p is defined as

PRE(p) = 100*(μ(eYx)-μ(Y))/μ(Y).

## Value

A numeric vector containing the percentage relative error for the first ten moments.

## References

Andersson, B., Branberg, K., Wiberg, M. (2013). Performing the Kernel Method of Test Equating with the Package kequate. Journal of Statistical Software, 55(6), 1–25. URL http://www.jstatsoft.org/v55/i06/

von Davier, A.A., Holland, P.W., Thayer, D.T. (2004). The Kernel Method of Test Equating. Springer-Verlag New York.

`glm` `kequate`
 ```1 2 3 4 5 6 7``` ```P<-c(5, 20, 35, 25, 15) Q<-c(10, 30, 30, 20, 10) x<-0:4 glmx<-glm(P~I(x)+I(x^2), family="poisson", x=TRUE) glmy<-glm(Q~I(x)+I(x^2), family="poisson", x=TRUE) keEG<-kequate("EG", 0:4, 0:4, glmx, glmy) PREp(getEq(keEG), 0:4, glmx\$fitted.values/100, glmy\$fitted.values/100) ```