transform_b: Transform FMP Item Parameters

Description Usage Arguments Details Value Examples

View source: R/transformations.R

Description

Given FMP item parameters for a single item and the polynomial coefficients defining a latent trait transformation, find the transformed FMP item parameters.

Usage

1
2
3
transform_b(bvec, tvec, ncat = 2)

inv_transform_b(bstarvec, tvec, ncat = 2)

Arguments

bvec

Vector of item parameters on the θ metric: (b0, b1, b2, b3, ...).

tvec

Vector of theta transformation polynomial coefficients: (t0, t1, t2, t3, ...)

ncat

Number of response categories (first ncat - 1 elements of bvec and bstarvec are intercepts)

bstarvec

Vector of item parameters on the θ* metric: (b*0, b*1, b*2, b*3, ...)

Details

Equivalent item response models can be written

P(θ) = b0 + b1θ + b2θ^2 + ... + b(2k+1)θ^{2k+1}

and

P(θ*) = b*0+b*1θ* + b*2θ*^2 + ... + b*_{2k*+1}θ^{2k*+1}

where

θ = t0 + t1θ* + t2θ*^2 + ... + t_{2k_θ+1}θ*^{2k_θ+1}.

When using inv_transform_b, be aware that multiple tvec/bstarvec pairings will lead to the same bvec. Users are advised not to use the inv_transform_b function unless bstarvec has first been calculated by a call to transform_b.

Value

Vector of transformed FMP item parameters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## example parameters from Table 7 of Reise & Waller (2003)
## goal: transform IRT model to sum score metric

a <- c(0.57, 0.68, 0.76, 0.72, 0.69, 0.57, 0.53, 0.64,
       0.45, 1.01, 1.05, 0.50, 0.58, 0.58, 0.60, 0.59,
       1.03, 0.52, 0.59, 0.99, 0.95, 0.39, 0.50)
b <- c(0.87, 1.02, 0.87, 0.81, 0.75, -0.22, 0.14, 0.56,
       1.69, 0.37, 0.68, 0.56, 1.70, 1.20, 1.04, 1.69,
       0.76, 1.51, 1.89, 1.77, 0.39, 0.08, 2.02)

## convert from difficulties and discriminations to FMP parameters

b1 <- 1.702 * a
b0 <- - 1.702 * a * b
bmat <- cbind(b0, b1)

## theta transformation vector (k_theta = 3)
##  see vignette for details about how to find tvec

tvec <- c(-3.80789e+00, 2.14164e+00, -6.47773e-01, 1.17182e-01,
          -1.20807e-02, 7.02295e-04, -2.13809e-05, 2.65177e-07)

## transform bmat
bstarmat <- t(apply(bmat, 1, transform_b, tvec = tvec))

## inspect transformed parameters
signif(head(bstarmat), 2)

## plot test response function
##  should be a straight line if transformation worked

curve(rowSums(irf_fmp(x, bmat = bstarmat)), xlim = c(0, 23),
      ylim = c(0, 23), xlab = expression(paste(theta,"*")),
      ylab = "Expected Sum Score")
abline(0, 1, col = 2)

flexmet documentation built on July 14, 2021, 1:06 a.m.