freqtab {equate} | R Documentation |
This function creates a frequency table for a vector, or vectors, of scores.
freqtab(x, xscale, v, vscale, addclass = FALSE)
x |
vector of scores (one per examinee) for form X |
xscale |
the score scale for form X, as a vector |
v |
vector of scores (one per examinee) for form X examinees on the anchor test |
vscale |
the anchor test score scale, as a vector |
addclass |
logical. When TRUE (and v is missing) x and xscale are simply combined as a matrix of class “freqtab ”
|
If x
is a vector of total scores, values are factored with levels = xscale
. This ensures that unobtained scores (i.e., scores not in x
) will still be represented in the tabulation. If x
is a vector of frequencies, with one value for each score scale point provided in xscale
, and addclass=TRUE
, the function serves to simply change the class of x
to “freqtab
”.
In the univariate case (i.e., no anchor is specified) a 2-column matrix is returned, where column 1 contains the score scale and column 2 the frequency for each scale value. In the bivariate case a 3-column matrix is returned where columns 1 and 2 contain all combinations of form X score scale points (in column 1) and score scale points on the anchor test (in column 2), and column 3 contains the total number of examinees obtaining the corresponding score combination.
Anthony Albano tony.d.albano@gmail.com
set.seed(2005) x1 <- round(rnorm(1000,100,10)) x1scale <- 70:130 freqtab(x1,x1scale) x2 <- ACTmath[,2] x2scale <- ACTmath[,1] freqtab(x2,x2scale,addclass=TRUE) xscale <- 0:36 vscale <- 0:12 freqtab(KBneat$x[,1],xscale,KBneat$x[,2],vscale)