Title: | Scale Alignment for Between-Items Multidimensional Rasch Family Models |
---|---|
Description: | Scale alignment is a new procedure for rescaling dimensions of between-items multidimensional Rasch family models so that dimensions scores can be compared directly (Feuerstahler & Wilson, 2019; under review) <doi:10.1111/jedm.12209>. This package includes functions for implementing delta-dimensional alignment (DDA) and logistic regression alignment (LRA) for dichotomous or polytomous data. This function also includes a wrapper for models fit using the 'TAM' package. |
Authors: | Leah Feuerstahler [aut, cre] |
Maintainer: | Leah Feuerstahler <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0.0 |
Built: | 2024-11-19 05:11:07 UTC |
Source: | https://github.com/cran/scaleAlign |
Apply scale alignment methods to models previously fit with tam.mml in the 'TAM' package.
align(mod, method = "best", refdim = 1)
align(mod, method = "best", refdim = 1)
mod |
Fitted model of class tam.mml. Importantly, mod$irtmodel must be either "1PL", "PCM", or "PCM2" |
method |
Either "DDA1", "DDA2", "LRA", or "best", see details |
refdim |
Which is the reference dimension (unchanged during alignment) |
Scales can be said to be aligned if the item sufficient statistics imply the same item parameter estimates, regardless of dimension. Scale alignment is currently defined only for Rasch family models with between-items multidimensionality (i.e., each scored item belongs to exactly one dimension).
MODEL PARAMETERIZATIONS
The partial credit model is a general Rasch family model for polytomous item
responses. Within 'TAM', the partial credit model can be parameterized in two
ways. If a 'TAM' model is fit with the option irtmodel = "PCM", then the
following model is specified for an item with response categories:
for response category , and
for response category .
is a dimension
steepness parameter, typically fixed to 1,
is a latent
variable on dimension
, and
is a step parameter for item
step
on item
belonging to dimension
.
If instead a TAM model is fit with the option irtmodel = "PCM2", the model is specified as
MODEL TRANSFORMATIONS
Under Rasch family models, the latent trait metric can be linearly
transformed. For each dimension the parameters on the transformed
metric (denoted by the
symbol) are found through the transformation
parameters
and
as described by the following equations:
SUFFICIENT STATISTICS
Under Rasch family models, the item sufficient statistics are the number of
examinees that score in response category or higher,
. For the purpose of scale alignment, we consider sufficient
statistics to be the proportion of examinees that score in response category
or higher. This definition allows for scale alignment in the
presence of missing data.
THURSTONE THRESHOLDS
Scales are aligned if the same sufficient statistics imply the same item parameters, regardless of dimension. The success of scale alignment is difficult to assess because the item sufficient statistics typically differ across items and dimensions. Under the Rasch model for binary item responses, the success of scale alignment can be assessed by looking at the rank-order correlation (e.g., Kendall's tau) between item sufficient statistics and item parameter estimates.
However, under the partial credit model, item sufficient statistics need not
be monotonically related to estimated item parameters. Under this model,
we can assess the quality of scale alignment by taking the rank-order
correlation between item sufficient statistics and Thurstone thresholds.
Thurstone thresholds are defined as the value at which the
probability of responding in category
or higher equals .5. Thurstone
thresholds, in most cases, will be monotonically related to item sufficient
statistics (within dimensions). Note that the item difficulty estimates
under the Rasch model for binary items are also Thurstone thresholds.
ALIGNMENT METHODS
Two types of scale alignment methods have been developed.
The first class of methods, historically called delta-dimensional alignment
(DDA), requires fitting both a multidimenisonal model and a model in which
all items belong to a single dimension. With these two sets of parameter
estimates, the transformation parameters and
are then
found so that, for each dimension, the means and standard deviation of
parameters from the transformed multidimensional models equal the means and
standard deviations of parameters from the unidimensional model. Under the
ordinary Rasch model, the estimated item difficulties can be used for
transformation (which is done if either method "DDA1" or "DDA2" is selected).
Under the partial credit model, either the
parameters or the
Thurstone thresholds from the two models may be used within the DDA (note
that DDA using item
parameters tends to be unsuccessful). Method
"DDA1" uses the item
parameters, and method "DDA2" uses the
Thurstone thresholds. If all items are binary, "DDA1" and "DDA2" are identical.
The second class of methods, called logistic regression alignment (LRA),
requires fitting a logistic regression between item sufficient statistics
and Thurstone thresholds for each dimension. The fitted logistic regression
coefficients can then be used to estimate and
so that the
same logistic regression curve expresses the relationship between sufficient
statistics and Thurstone thresholds for all dimensions.
For either the DDA or LRA method, a reference dimension (by default, the
first dimension) is specified such that and
for
the reference dimension.
Aligned tam.mml object with the following added list items:
method |
Alignment method: "DDA1", "DDA2", or "LRA" |
rhat |
Vector of estimated scaling parameters r, see details |
shat |
Vector of estimated shift parameters s, see details |
cor_before |
Kendall's rank-order correlation between sufficient statistics and Thurstone thresholds before alignment |
cor_after |
Kendall's rank-order correlation between sufficient statistics and Thurstone thresholds after alignment |
Feuerstahler, L. M., & Wilson, M. (2019). Scale alignment in between-item multidimensional Rasch models. Journal of Educational Measurement, 56(2), 280–301. <doi: 10.1111/jedm.12209>
Feuerstahler, L. M., & Wilson, M. (under review). Scale alignment in the between-items multidimensional partial credit model.
## Example 1: binary item response data ## generate data for a 2-dimensional model with 10 items on each dimension if(require(TAM)){ set.seed(2524) diff_1 <- rnorm(10) diff_2 <- rnorm(10) N <- 500 th <- MASS::mvrnorm(N, mu = c(0, -1), Sigma = matrix(c(1, .5 * 2, .5 * 2, 4), nrow = 2)) probs_1 <- 1 / (1 + exp(-outer(th[, 1], diff_1, "-"))) probs_2 <- 1 / (1 + exp(-outer(th[, 2], diff_2, "-"))) probs <- cbind(probs_1, probs_2) dat <- apply(probs, 2, function(p) as.numeric(p > runif(N))) Q <- cbind(c(rep(1, 10), rep(0, 10)), c(rep(0, 10), rep(1, 10))) # fit the model mod <- TAM::tam.mml(resp = dat, irtmodel = "1PL", Q = Q) # align the model mod_aligned <- align(mod) ## check alignment success mod_aligned$cor_before mod_aligned$cor_after ## view "best" alignment method mod_aligned$method ## view alignment parameters mod_aligned$rhat mod_aligned$shat } ## Example 2: Partial Credit Model # generate 3-category data for a 2-dimensional model with 5 items on each dimension set.seed(8491) N <- 500 th <- MASS::mvrnorm(N, mu = c(0, 0), Sigma = matrix(c(1, .5 * 2, .5 * 2, 4), nrow = 2)) xi_1 <- rnorm(5) xi_1 <- cbind(xi_1, xi_1 + rnorm(5, mean = 1, sd = .5)) xi_2 <- rnorm(5) xi_2 <- cbind(xi_2, xi_2 + rnorm(5, mean = 1, sd = .5)) dat1 <- catR::genPattern(th[, 1], it = xi_1, model = "PCM") dat2 <- catR::genPattern(th[, 2], it = xi_2, model = "PCM") dat <- cbind(dat1, dat2) Q <- cbind(c(rep(1, 5), rep(0, 5)), c(rep(0, 5), rep(1, 5))) ## fit the model using both parameterizations mod1 <- TAM::tam.mml(resp = dat, irtmodel = "PCM", Q = Q) mod2 <- TAM::tam.mml(resp = dat, irtmodel = "PCM2", Q = Q) ## align the models mod1_aligned <- align(mod1) mod2_aligned <- align(mod2) ## check alignment success mod1_aligned$cor_before mod1_aligned$cor_after mod2_aligned$cor_before mod2_aligned$cor_after ## view "best" alignment method mod1_aligned$method mod2_aligned$method ## view alignment parameters mod1_aligned$rhat mod1_aligned$shat mod2_aligned$rhat mod2_aligned$shat
## Example 1: binary item response data ## generate data for a 2-dimensional model with 10 items on each dimension if(require(TAM)){ set.seed(2524) diff_1 <- rnorm(10) diff_2 <- rnorm(10) N <- 500 th <- MASS::mvrnorm(N, mu = c(0, -1), Sigma = matrix(c(1, .5 * 2, .5 * 2, 4), nrow = 2)) probs_1 <- 1 / (1 + exp(-outer(th[, 1], diff_1, "-"))) probs_2 <- 1 / (1 + exp(-outer(th[, 2], diff_2, "-"))) probs <- cbind(probs_1, probs_2) dat <- apply(probs, 2, function(p) as.numeric(p > runif(N))) Q <- cbind(c(rep(1, 10), rep(0, 10)), c(rep(0, 10), rep(1, 10))) # fit the model mod <- TAM::tam.mml(resp = dat, irtmodel = "1PL", Q = Q) # align the model mod_aligned <- align(mod) ## check alignment success mod_aligned$cor_before mod_aligned$cor_after ## view "best" alignment method mod_aligned$method ## view alignment parameters mod_aligned$rhat mod_aligned$shat } ## Example 2: Partial Credit Model # generate 3-category data for a 2-dimensional model with 5 items on each dimension set.seed(8491) N <- 500 th <- MASS::mvrnorm(N, mu = c(0, 0), Sigma = matrix(c(1, .5 * 2, .5 * 2, 4), nrow = 2)) xi_1 <- rnorm(5) xi_1 <- cbind(xi_1, xi_1 + rnorm(5, mean = 1, sd = .5)) xi_2 <- rnorm(5) xi_2 <- cbind(xi_2, xi_2 + rnorm(5, mean = 1, sd = .5)) dat1 <- catR::genPattern(th[, 1], it = xi_1, model = "PCM") dat2 <- catR::genPattern(th[, 2], it = xi_2, model = "PCM") dat <- cbind(dat1, dat2) Q <- cbind(c(rep(1, 5), rep(0, 5)), c(rep(0, 5), rep(1, 5))) ## fit the model using both parameterizations mod1 <- TAM::tam.mml(resp = dat, irtmodel = "PCM", Q = Q) mod2 <- TAM::tam.mml(resp = dat, irtmodel = "PCM2", Q = Q) ## align the models mod1_aligned <- align(mod1) mod2_aligned <- align(mod2) ## check alignment success mod1_aligned$cor_before mod1_aligned$cor_after mod2_aligned$cor_before mod2_aligned$cor_after ## view "best" alignment method mod1_aligned$method mod2_aligned$method ## view alignment parameters mod1_aligned$rhat mod1_aligned$shat mod2_aligned$rhat mod2_aligned$shat
Apply scale alignment methods to sets of item parameters and other model information provided by the user. These functions may be used to apply scale alignment to output from other item parameter estimation programs such as ConQuest. Note that dda1 and dda2 both require user-provided unidimensional and multidimensional item parameters.The lrafunction requires user-provided sufficient statistics, thresholds, and the number of observations and response categories per item. The function lra2 is a wrapper for lra that computes some needed quantities from a user-provided data set.
dda1( multi_pars, uni_pars, itemtype, item_ind, dim_ind_i, refdim = 1, alpha = 1 ) dda2( multi_pars, uni_pars, itemtype, item_ind, dim_ind_i, refdim = 1, alpha = 1 ) lra( multi_pars, itemtype, ss, nobs, ncats, thresh_m, item_ind, dim_ind_i, refdim = 1, alpha = 1 ) lra2(dat, multi_pars, itemtype, item_ind, dim_ind_i, refdim = 1, alpha = 1)
dda1( multi_pars, uni_pars, itemtype, item_ind, dim_ind_i, refdim = 1, alpha = 1 ) dda2( multi_pars, uni_pars, itemtype, item_ind, dim_ind_i, refdim = 1, alpha = 1 ) lra( multi_pars, itemtype, ss, nobs, ncats, thresh_m, item_ind, dim_ind_i, refdim = 1, alpha = 1 ) lra2(dat, multi_pars, itemtype, item_ind, dim_ind_i, refdim = 1, alpha = 1)
multi_pars |
Vector of estimated multidimensional item parameters, to be rescaled. |
uni_pars |
Vector of estimated unidimensional item parameters, must be in the same order as multi_pars. |
itemtype |
Item type: "1PL", "PCM", or "PCM2", see align. |
item_ind |
Vector with one element for each parameter indicating which item each parameter is associated with. |
dim_ind_i |
Vector with one element for each item indicating which dimension each item is associated with. |
refdim |
Which is the reference dimension (unchanged during alignment) |
alpha |
Vector of dimension steepnesses (often set equal to 1). Recycled if alpha is of length 1. |
ss |
Item sufficient statistics as proportions of examinees who reach each step, see align. Should be of the same length as multi_pars. |
nobs |
Number of observed (non-missing) data points for each item. |
ncats |
Number of response categories for each item. |
thresh_m |
Vector of Thurstone thresholds. Should be the same length as multi_pars and ss. |
dat |
Data set with items as columns and examinees as rows. This data set must be the same data set used to estimate item parameters. |
See align.
List with the following elements
rhat |
Vector of estimated scaling parameters |
shat |
Vector of estimated shift parameters |
alphatilde |
Vector of transformed dimension steepnesses |
new_pars |
Vector of transformed (i.e., aligned) item parameters |
thresh |
Vector of aligned Thurstone thresholds |
Find sufficient statistics from a data set
get_ss(dat)
get_ss(dat)
dat |
Data set with items as columns and examinees as rows. Missing responses should be coded as NA. |
Vector of sufficient statistics
set.seed(2524) diff_1 <- rnorm(10) diff_2 <- rnorm(10) N <- 500 th <- MASS::mvrnorm(N, mu = c(0, -1), Sigma = matrix(c(1, .5 * 2, .5 * 2, 4), nrow = 2)) probs_1 <- 1 / (1 + exp(-outer(th[, 1], diff_1, "-"))) probs_2 <- 1 / (1 + exp(-outer(th[, 2], diff_2, "-"))) probs <- cbind(probs_1, probs_2) dat <- apply(probs, 2, function(p) as.numeric(p > runif(N))) get_ss(dat)
set.seed(2524) diff_1 <- rnorm(10) diff_2 <- rnorm(10) N <- 500 th <- MASS::mvrnorm(N, mu = c(0, -1), Sigma = matrix(c(1, .5 * 2, .5 * 2, 4), nrow = 2)) probs_1 <- 1 / (1 + exp(-outer(th[, 1], diff_1, "-"))) probs_2 <- 1 / (1 + exp(-outer(th[, 2], diff_2, "-"))) probs <- cbind(probs_1, probs_2) dat <- apply(probs, 2, function(p) as.numeric(p > runif(N))) get_ss(dat)
Find Thurstone thresholds from a fitted model.
get_thresh(pars, itemtype, item_ind, alpha = 1)
get_thresh(pars, itemtype, item_ind, alpha = 1)
pars |
Vector of estimated item parameters |
itemtype |
Item type: "1PL", "PCM", or "PCM2". |
item_ind |
Vector with one element for each parameter indicating which item each parameter is associated with. |
alpha |
Vector of item steepnesses, with one element for each item. Recycled if of length 1. |
Vector of Thurstone thresholds
if(require(TAM)){ set.seed(2524) diff <- rnorm(10) N <- 500 th <- rnorm(N) probs <- 1 / (1 + exp(-outer(th, diff, "-"))) dat <- apply(probs, 2, function(p) as.numeric(p > runif(N))) # fit the model mod <- TAM::tam.mml(resp = dat, irtmodel = "1PL") get_thresh(mod$xsi$xsi, itemtype = "1PL", item_ind = 1:10) }
if(require(TAM)){ set.seed(2524) diff <- rnorm(10) N <- 500 th <- rnorm(N) probs <- 1 / (1 + exp(-outer(th, diff, "-"))) dat <- apply(probs, 2, function(p) as.numeric(p > runif(N))) # fit the model mod <- TAM::tam.mml(resp = dat, irtmodel = "1PL") get_thresh(mod$xsi$xsi, itemtype = "1PL", item_ind = 1:10) }