Learn R Programming

kequate (version 1.6.4)

FTres: Freeman-Tukey Residuals

Description

Calculates the Freeman-Tukey residuals for log-linear models of frequency data. If the frequencies are assumed to be Poisson distributed, then the Freeman-Tukey residuals are approximately normal distributed.

Usage

FTres(obs, fit)

Arguments

obs

A numeric vector containing the observed frequencies.

fit

A numeric vector containing the estimated frequencies.

Value

A numeric vector containing the Freeman-Tukey residuals.

Details

For an observed frequency \(n_{i}\) and the estimated frequency \(m_{i}\), the Freeman-Tukey residual \(FT_{i}\) is defined as \(FT_{i} = \sqrt{n_{i}}+\sqrt{n_{i}+1}-\sqrt{4m_{i}+1}.\)

References

Andersson, B., Branberg, K., and Wiberg, M. (2013). Performing the Kernel Method of Test Equating with the Package kequate. Journal of Statistical Software, 55(6), 1--25. <doi:10.18637/jss.v055.i06>

Holland, P.W, Thayer, D. (1998). Univariate and Bivariate Loglinear Models for Discrete Test Score Distributions ETS Technical Report No 98-1.

See Also

glm

Examples

Run this code
# NOT RUN {
#Example data:
P<-c(5, 20, 35, 25, 15)
x<-0:4
glmx<-glm(P~I(x)+I(x^2), family="poisson", x=TRUE)
res<-FTres(glmx$y, glmx$fitted.values)
# }

Run the code above in your browser using DataLab