FTres | R Documentation |
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.
FTres(obs, fit)
obs |
A numeric vector containing the observed frequencies. |
fit |
A numeric vector containing the estimated frequencies. |
For an observed frequency ni and the estimated frequency mi, the Freeman-Tukey residual FTi is defined as
FTi = √(ni)+√(ni+1)-√(4mi+1).
A numeric vector containing the Freeman-Tukey residuals.
bjorn.andersson@statistik.uu.se
kenny.branberg@stat.umu.se
marie.wiberg@stat.umu.se
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.
glm
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.