Package 'scaleAlign'

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

Help Index


Scale Alignment Wrapper Function for 'TAM' Objects

Description

Apply scale alignment methods to models previously fit with tam.mml in the 'TAM' package.

Usage

align(mod, method = "best", refdim = 1)

Arguments

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)

Details

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 m+1m + 1 response categories:

log(P(xθd)P(x1θd))=αdθdξi(d)x\log(\frac{P(x | \theta_d)}{P(x-1 | \theta_d)}) = \alpha_d \theta_d - \xi_{i(d)x}

for response category x=1,...,mx = 1,...,m, and

P(x=0θd)=1j=0mexpk=0j(αdθdξi(d)k)P(x = 0 | \theta_d) = \frac{1}{\sum_{j=0}^{m}\exp \sum_{k=0}^j (\alpha_d \theta_d - \xi_{i(d)k})}

for response category x=0x=0. αd\alpha_d is a dimension steepness parameter, typically fixed to 1, θd\theta_d is a latent variable on dimension dd, and ξi(d)x\xi_i(d)x is a step parameter for item step xx on item ii belonging to dimension dd.

If instead a TAM model is fit with the option irtmodel = "PCM2", the model is specified as

log(P(xθd)P(x1θd))=αdθdδi(d)+τi(d)x.\log(\frac{P(x | \theta_d)}{P(x-1 | \theta_d)}) = \alpha_d \theta_d - \delta_{i(d)} + \tau_{i(d)x}.

MODEL TRANSFORMATIONS

Under Rasch family models, the latent trait metric can be linearly transformed. For each dimension dd the parameters on the transformed metric (denoted by the \sim symbol) are found through the transformation parameters rdr_d and sds_d as described by the following equations:

θ~d=rdθd+sd\tilde{\theta}_d = r_{d} \theta_{d} + s_{d}

α~d=αd/rd\tilde{\alpha}_d = \alpha_{d} / r_{d}

ξ~i(d)x=ξi(d)x+αdsd/rd\tilde{\xi}_{i(d)x} = \xi_{i(d)x} + \alpha_d s_d / r_d

δ~i(d)=δi(d)+αdsd/rd\tilde{\delta}_{i(d)} = \delta_{i(d)} + \alpha_d s_d / r_d

τ~i(d)x=τi(d)x\tilde{\tau}_{i(d)x} = \tau_{i(d)x}

SUFFICIENT STATISTICS

Under Rasch family models, the item sufficient statistics are the number of examinees that score in response category xx or higher, x=1,...,mx = 1,...,m. For the purpose of scale alignment, we consider sufficient statistics to be the proportion of examinees that score in response category xx 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 θ\theta value at which the probability of responding in category xx 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 rdr_d and sds_d 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 δ\delta parameters or the Thurstone thresholds from the two models may be used within the DDA (note that DDA using item ξ\xi parameters tends to be unsuccessful). Method "DDA1" uses the item δ\delta 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 rdr_d and sds_d 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 rd=1r_d = 1 and sd=0s_d = 0 for the reference dimension.

Value

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

References

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.

Examples

## 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

Scale Alignment Methods

Description

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.

Usage

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)

Arguments

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.

Details

See align.

Value

List with the following elements

rhat

Vector of estimated scaling parameters rr

shat

Vector of estimated shift parameters ss

alphatilde

Vector of transformed dimension steepnesses

new_pars

Vector of transformed (i.e., aligned) item parameters

thresh

Vector of aligned Thurstone thresholds


Get sufficient statistics

Description

Find sufficient statistics from a data set

Usage

get_ss(dat)

Arguments

dat

Data set with items as columns and examinees as rows. Missing responses should be coded as NA.

Value

Vector of sufficient statistics

Examples

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)

Get Thurstone thresholds

Description

Find Thurstone thresholds from a fitted model.

Usage

get_thresh(pars, itemtype, item_ind, alpha = 1)

Arguments

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.

Value

Vector of Thurstone thresholds

Examples

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)

}