cdist {kequate} | R Documentation |
Conditional Mean, Variance, Skewness and Kurtosis
Description
Calculates conditional means, variances, skewnesses and kurtoses for observed and estimated bivariate probability distributions of test scores.
Usage
cdist(est, obs, xscores, ascores)
Arguments
est |
Matrix of estimated bivariate score probabilities. |
obs |
Matrix of observed bivariate score probabilities. |
xscores |
Optional argument to specify the score vector for test X. |
ascores |
Optional argument to specify the score vector for test A. |
Value
An object of class 'cdist' containing the following slots
est1 |
Matrix of conditional means, variances, skewnesses and kurtoses of X given A for the estimated score distribution. |
est2 |
Matrix of conditional means, variances, skewnesses and kurtoses of A given X for the estimated score distribution. |
obs1 |
Matrix of conditional means, variances, skewnesses and kurtoses of X given A for the observed score distribution. |
obs2 |
Matrix of conditional means, variances, skewnesses and kurtoses of A given X for the observed score distribution. |
Author(s)
bjorn.andersson@statistik.uu.se
kenny.branberg@stat.umu.se
marie.wiberg@stat.umu.se
References
von Davier, A.A., Holland, P.W., Thayer, D.T. (2004). The Kernel Method of Test Equating. Springer-Verlag New York.
Holland, P.W., Thayer, D. (1998). Univariate and Bivariate Loglinear Models for Discrete Test Score Distributions ETS Technical Report No 98-1.
See Also
Examples
freqdata<-data.frame(X=c(1,2,2,1,2,2,2,2,3,1,2,1,4,2,1,1,3,3,3,3),
A=(c(0,2,1,1,0,3,1,2,2,0,2,0,3,1,1,2,2,2,1,2)))
Pdata<-kefreq(freqdata$X, 0:5, freqdata$A, 0:3)
Pglm<-glm(frequency~X+I(X^2)+A+I(A^2)+X:A, data=Pdata, family="poisson", x=TRUE)
Pobs<-matrix(Pdata$freq, nrow=6)/sum(Pglm$y)
Pest<-matrix(Pglm$fitted.values, nrow=6)/sum(Pglm$y)
cdP<-cdist(Pest, Pobs, 0:5, 0:3)
plot(cdP)