freqtab creates a frequency table for a vector, or vectors, of scores. as.freqtab converts to class freqtabfreqtab(x, v, xitems = 1:ncol(x), vitems = 1:ncol(v),
xscale, vscale, na.rm = TRUE)
as.freqtab(x)x refers to the total test, and v refers to the anchor test. See below for details.x and v when they contain item responses.TRUE specifying whether or not missing item responses should be ignored, i.e., treated as 0, when calculating total scores.freqtab, if x and v are vectors of total scores, one per examinee, they will be factored with levels = xscale. This ensures that unobtained scores (i.e., scores not in x or v) will still be represented in the frequency tabulation.When x is a matrix with at least two columns, total scores are calculated for each row across the columns specified in xitems. The same is true for v and vitems. If x and vitems are supplied but v is not, x is assumed to contain item responses for the anchor items as well.
as.freqtab serves to simply change a frequency table x to class freqtabequate. The first column in ftab should contain the score scale. For a univariate distribution, the second column should contain the numbers of examinees obtaining each score in column 1. For a bivariate distribution, the second column in ftab should contain the anchor test score scale, and the third column the number of examinees obtaining each score combination.
tableset.seed(2005)
x1 <- round(rnorm(1000, 100, 10))
x1scale <- 70:130
freqtab(x = x1, xscale = x1scale)
as.freqtab(ACTmath[, 1:2])
freqtab(x = KBneat$x[, 1], v = KBneat$x[, 2],
xscale = 0:36, vscale = 0:12)Run the code above in your browser using DataLab