Package 'birtr'

Title: The R Package for "The Basics of Item Response Theory Using R"
Description: R functions for "The Basics of Item Response Theory Using R" by Frank B. Baker and Seock-Ho Kim (Springer, 2017, ISBN-13: 978-3-319-54204-1) including iccplot(), icccal(), icc(), iccfit(), groupinv(), tcc(), ability(), tif(), and rasch(). For example, iccplot() plots an item characteristic curve under the two-parameter logistic model.
Authors: Seock-Ho Kim [aut, cre]
Maintainer: Seock-Ho Kim <[email protected]>
License: GPL (>= 2)
Version: 1.0.0
Built: 2024-12-09 06:42:40 UTC
Source: CRAN

Help Index


Ability Estimation

Description

Estimates the ability parameter and obtains the standard error of the estimate given the item characteristic curve model, the response vector, and the set of known item parameters under the one-, two-, or three-parameter logistic model.

Usage

ability(mdl, u, b, a, c)

Arguments

mdl

1, 2, or 3 representing the number of the model parameters.

u

a numeric vector of 0s and 1s representing the responses to items.

b

a numeric vector representing the values of item difficulty.

a

a numeric vector representing the values of item discrimination.

c

a numeric vector representing the values of lower asymptote.

Details

With the number of item characteristic curve model parameters mdl, the response vector u, and the set of item parameters b, a, and c, the ability parameter is estimated and reported as th by the maximum likelilhood procedure. The estimated standard error se is also obtained and reported. The length of u should be the same as that of b, a, and c. Each parameter c has a theoretical range from 0 to 1, but in practice values above .35 are not considered acceptable, hence use the range from 0 to .35 for each c. Under the one-parameter logisric model, a = rep(1, length(b)) and c = rep(0, length(b)). Under the two-parameter logistic model, c = rep(0, lenght(b)).

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1

Examples

u <- c(1, 0, 1)
b <- c(-1.0, 0.0, 1.0)
a <- c(1.0, 1.2, 0.8)
ability(2, u, b, a) # ability(2, u, b, a, c = rep(0, length(b)))
theta.se <- ability(2, u, b, a)
theta.se

The R Package for "The Basics of Item Response Theory Using R"

Description

The birtr package provides nine important functions: iccplot(), icccal(), icc(), iccfit(), groupinv(), tcc(), ability(), tif(), and rasch().

Details

The iccplot() function plots an item characteristic curve under the two-parameter logistic model.

The icccal() function computes the logistic deviate L, the exponent of negative L, the denominator, and the value of probability of correct response for each of seven ability levels evenly spaced from -3 to +3 under the one-, two-, or three-parameter logistic item characteristic curve model.

The icc() function plots an item characteristic curve under the one-, two-, or three-parameter logistic model.

The iccfit() function plots the item characteristic curve and the simulated observed proportions of correct response from the one-, two-, or three-parameter logistic model.

The groupinv() function plots the item characteristic curve and the two sets of simulated observed proportions of correct response from two groups under the one-, two-, or three-parameter logistic model.

The tcc() function plots a test characteristic curve from a set of item parameters under the one-, two-, or three-parameter logistic model.

The ability() function estimates the ability parameter and obtains the standard error of the estimate given the item characteristic curve model, the response vector, and the set of known item parameters under the one-, two-, or three-parameter logistic model.

The tif() function plots a test information function from a set of item parameters under the one-, two-, or three-parameter logistic model.

The rasch() function yields estimates of item difficulty parameters and ability parameters under the one-parameter logistic Rasch model by the Birnbaum paradigm.

Author(s)

Seock-Ho Kim [email protected]

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1


Group Invariance of Item Parameters

Description

Plots the item characteristic curve and the two sets of simulated observed proportions of correct response from two groups under the one-, two-, or three-parameter logistic model.

Usage

groupinv(mdl, t1l, t1u, t2l, t2u)

Arguments

mdl

1, 2, or 3 representing the number of the model parameters.

t1l

a number indicating the lower bound of ability for group 1.

t1u

a number indicating the upper bound of ability for group 1.

t2l

a number indicating the lower bound of ability for group 2.

t2u

a number indicating the upper bound of ability for group 2.

Details

While the theoretical range of ability is from negative infinity to positive infinity, practical considerations usually limit the range of values from -3 to +3. The default values are t1l = -3, t1u = -1, t2l = 1, and t2u = 3. With the number of item characteristic curve model parameters mdl the item parameters are randomly sampled from the uniform distributions; for example, under the three-parameter logistic model, b from the -3 to 3 range, a from the 0.2 to 2.8 range, and c from the 0 to .35 range. Each of the 33 ability levels from the -3 to +3 range with .1875 interval, the observed proportion of correct response is generated from the binomial distribution for sample size of 21. The ability levels and the observed proportions of correct response between t1l and t1u are used as the group 1 data, and the ability levels and the observed proportions of correct response between t2l and t2u are used as the group 2 data. The data from the pooled groups are used to obatin the plot that displays the set of item parameters.

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1

Examples

groupinv(1) # groupinv(1, -3, -1, 1, 3)
groupinv(2) # groupinv(2, -3, -1, 1, 3)
groupinv(3) # groupinv(3, -3, -1, 1, 3)
groupinv(2, -2, 1, -1, 2)

Item Characteristic Curve

Description

Plots an item characteristic curve under the one-, two-, or three-parameter logistic model.

Usage

icc(b, a, c)

Arguments

b

a single number representing the value of item difficulty.

a

a single number representing the value of item discrimination.

c

a single number representing the value of lower asymptote.

Details

While the theoretical range of ability is from negative infinity to positive infinity, practical considerations usually limit the range of values from -3 to +3. Under the one-parameter logistic model, a = 1 and c = 0. Under the two-parameter logistic model, c = 0. The parameter c has a theoretical range from 0 to 1, but in practice values above .35 are not considered acceptable, hence use the range from 0 to .35 for c. The vertical dotted line corresponds to the value of the item difficulty parameter.

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1

Examples

icc(1.5, 1.3, .2)
icc(a = 1.3, b = 1.5, c = .2)
icc(1)      # icc(1, 1, 0)
icc(1, 0.5) # icc(1, 0.5, 0)

Item Characteristic Curve Calculations

Description

Computes the logistic deviate L, the exponent of negative L, the denominator, and the value of probability of correct response for each of seven ability levels evenly spaced from -3 to +3 under the one-, two-, or three-parameter logistic item characteristic curve model.

Usage

icccal(b, a, c)

Arguments

b

a single number representing the value of item difficulty.

a

a single number representing the value of item discrimination.

c

a single number representing the value of lower asymptote.

Details

While the theoretical range of ability is from negative infinity to positive infinity, practical considerations usually limit the range of values from -3 to +3. Under the one-parameter logistic model, a = 1 and c = 0. Under the two-parameter logistic model, c = 0. The parameter c has a theoretical range from 0 to 1, but in practice values above .35 are not considered acceptable, hence use the range from 0 to .35 for c.

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1

Examples

icccal(1.5, 1.3, .2)
icccal(a = 1.3, b = 1.5, c = .2)
icccal(1)      # icccal(1, 1, 0)
icccal(1, 0.5) # icccal(1, 0.5, 0)

Item Characteristic Curve Fitting

Description

Plots the item characteristic curve and the simulated observed proportions of correct response from the one-, two-, or three-parameter logistic model.

Usage

iccfit(mdl)

Arguments

mdl

1, 2, or 3 representing the number of the model parameters.

Details

While the theoretical range of ability is from negative infinity to positive infinity, practical considerations usually limit the range of values from -3 to +3. With the number of item characteristic curve model parameters mdl the item parameters are randomly sampled from the uniform distributions; for example, under the three-parameter logistic model, b from the -3 to 3 range, a from the 0.2 to 2.8 range, and c from the 0 to .35 range. Each of the 33 ability levels from the -3 to +3 range with .1875 interval, the observed proportion of correct response is generated from the binomial distribution for sample size of 21. The chi-square goodness-of-fit index is obtained and reported with the set of item parameters.

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1

Examples

iccfit(1)
iccfit(2)
iccfit(3)

Item Characteristic Curve Plot

Description

Plots an item characteristic curve under the two-parameter logistic model.

Usage

iccplot(b, a)

Arguments

b

a single number representing the value of item difficulty.

a

a single number representing the value of item discrimination.

Details

While the theoretical range of ability is from negative infinity to positive infinity, practical considerations usually limit the range of values from -3 to +3.

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1

Examples

iccplot(0, 1)
iccplot(a = 1, b = 0)
iccplot(0, 1); par(new = TRUE); iccplot(-1.5, 1)

Rasch Model Calibration

Description

Yields estimates of item difficulty parameters and ability parameters under the one-parameter logistic Rasch model by the Birnbaum paradigm.

Usage

rasch(s, f)

Arguments

s

a numeric vector representing the column sum for the J items.

f

a numeric vector representing the frequencies for the scores from 1 to J-1.

Details

With data editing command lines, the item response data matrix of N by J is to be converted to the two vectors of the column sum s and the frequencies for the scores f. The two vectors are the input for the Birnbaum paradigm to calibrate the test. The function contains two other required functions, stage1 and stage2. After obtaining the item and ability parameter estimates from the Birnbaum paradigm, bias correction methods are applied to the item parameter estimates and then to the ability parameter estimates. The estimates of item difficulty parameters b are reported in the console window. The estimates of ability parameters theta are not for individual examinees but for the raw score groups ranged from 1 to J-1. The function prints out the mean and the standard deviation of the item parameter estimates as well as those of the ability parameter estimates.

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1

Examples

rm(list = ls()) # remove the existing objects in workspace
s <- c(13, 8, 8, 5, 10, 7, 7, 6, 7, 3)
f <- c(1, 2,  2, 4, 1, 1, 0, 0, 4)
rasch(s, f)

Test Characteristic Curve

Description

Plots a test characteristic curve from a set of item parameters under the one-, two-, or three-parameter logistic model.

Usage

tcc(b, a, c)

Arguments

b

a numeric vector representing the values of item difficulty.

a

a numeric vector representing the values of item discrimination.

c

a numeric vector representing the values of lower asymptote.

Details

While the theoretical range of ability is from negative infinity to positive infinity, practical considerations usually limit the range of values from -3 to +3. The length of b should be the same as that of a and c. Each parameter c has a theoretical range from 0 to 1, but in practice values above .35 are not considered acceptable, hence use the range from 0 to .35 for each c. Under the one-parameter logistic model, a = rep(1, length(b)) and c = rep(0, length(b)). Under the two-parameter logistic model, c = rep(0, length(b)).

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1

Examples

b <- c(-2.0, -1.0, 0.0, 1.0, 2.0)
a <- c(0.5, 0.75, 1.0, 0.75, 0.5)
c <- c(.2, .2, .2, .2, .2)
tcc(b, a, c)
tcc(a = a, b = b, c = c)
tcc(b)    # tcc(b, a = rep(1, length(b)), c = rep(0, length(b)))
tcc(b, a) # tcc(b, a, c = rep(0, length(b)))

Test Information Function

Description

Plots a test information function from a set of item parameters under the one-, two-, or three-parameter logistic model.

Usage

tif(b, a, c)

Arguments

b

a numeric vector representing the values of item difficulty.

a

a numeric vector representing the values of item discrimination.

c

a numeric vector representing the values of lower asymptote.

Details

While the theoretical range of ability is from negative infinity to positive infinity, practical considerations usually limit the range of values from -3 to +3. The length of b should be the same as that of a and c. Each parameter c has a theoretical range from 0 to 1, but in practice values above .35 are not considered acceptable, hence use the range from 0 to .35 for each c. Under the one-parameter logistic model, a = rep(1, length(b)) and c = rep(0, length(b)). Under the two-parameter logistic model, c = rep(0, length(b)). In case b to be a single number, then the plot contains the item informaiton function. Note that the maximum of the information value on the vertical axis of the graph is arbitrarily set to 10.

References

Baker, F. B., & Kim, S.-H. (2017). The basics of item response theory using R. New York, NY: Springer. ISBN-13: 978-3-319-54204-1

Examples

b <- c(-1.0, -0.5, 0.0, 0.5, 1.0)
a <- c(2.0, 1.5, 1.5, 1.5, 2.0)
c <- c(.2, .2, .2, .2, .2)
tif(b, a, c)
tif(a = a, b = b, c = c)
tif(b)    # tif(b, a = rep(1, length(b)), c = rep(0, length(b)))
tif(b, a) # tif(b, a, c = rep(0, length(b)))