Title: Fit Bounded Continuous Item Response Theory Models to Data
Version: 0.0.1
Description: Bounded continuous data are encountered in many areas of test application. Examples include visual analogue scales used in the measurement of personality, mood, depression, and quality of life; item response times from tests with item deadlines; confidence ratings; and pain intensity ratings. Using this package, item response theory (IRT) models suitable for bounded continuous item scores can be fitted to data within a Bayesian framework. The package draws on posterior sampling facilities provided by R-package 'rstan' (Stan Development Team, 2025)https://mc-stan.org/. Available models include the Beta IRT model by Noel and Dauvier (2007)<doi:10.1177/0146621605287691>, the continuous response model by Samejima (1973)<doi:10.1007/BF03372160>, the unbounded normal model by Mellenbergh (1994)<doi:10.1207/s15327906mbr2903_2>, and the Simplex IRT model by Flores et al. (2020)<doi:10.1007/978-3-030-43469-4_8>. All models can be fitted with or without zero-one inflation (Molenaar et al., 2022)<doi:10.3102/10769986221108455>. Model fit comparisons can be conducted using the Watanabe–Akaike information criterion (WAIC), the deviance information criterion (DIC), and the fully marginalized likelihood (i.e., Bayes factors).
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.3
Biarch: true
Depends: R (≥ 3.5)
Imports: methods, mvtnorm, rmutil, MASS, Rcpp (≥ 0.12.0), RcppParallel (≥ 5.0.1), rstan (≥ 2.18.1), rstantools (≥ 2.6.0)
LinkingTo: BH (≥ 1.66.0), Rcpp (≥ 0.12.0), RcppEigen (≥ 0.3.3.3.0), RcppParallel (≥ 5.0.1), rstan (≥ 2.18.1), StanHeaders (≥ 2.18.0)
SystemRequirements: GNU make
LazyData: true
LazyDataCompression: xz
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
NeedsCompilation: yes
Packaged: 2026-04-13 10:30:14 UTC; dmolena1
Author: Dylan Molenaar [aut, cre]
Maintainer: Dylan Molenaar <d.molenaar@uva.nl>
Repository: CRAN
Date/Publication: 2026-04-20 12:40:02 UTC

The 'BoundIRT' package.

Description

Bounded continuous data are encountered in many areas of test application. Examples include visual analogue scales used in the measurement of personality, mood, depression, and quality of life; item response times from tests with item deadlines; confidence ratings; and pain intensity ratings. Using this package, item response theory (IRT) models suitable for bounded continuous item scores can be fitted to data within a Bayesian framework. The package draws on posterior sampling facilities provided by R-package 'rstan' (Stan Development Team, 2025). Available models include the Beta IRT model by Noel and Dauvier (2007), the continuous response model by Samejima (1973), the unbounded normal model by Mellenbergh (1994), and the Simplex IRT model by Flores et al. (2020). All models can be fitted with or without zero-one inflation (Molenaar et al., 2022). Model fit comparisons can be conducted using the Watanabe–Akaike information criterion (WAIC), the deviance information criterion (DIC), and the fully marginalized likelihood (i.e., Bayes factors).

Author(s)

Maintainer: Dylan Molenaar d.molenaar@uva.nl

References

Flores, S., Bazan, J.L., & Bolfarine, H. (2020). A hierarchical joint model for bounded response time and response accuracy. In M. Wiberg, D. Molenaar, J. González,U. Bockenholt, & K. S. Kim (Eds.), Quantitative psychology: The 84th Annual Meeting of the Psychometric Society, Santiago de Chile, Chile (pp. 95-109). Springer. doi:10.1007/978-3-030-43469-4_8

Mellenbergh, G. J. (1994). A unidimensional latent trait model for continuous item responses. Multivariate Behavioral Research, 29(3), 223-236. doi:10.1207/s15327906mbr2903_2

Molenaar, D., Cúri, M., & Bazán, J.L. (2022). Zero and One Inflated Item Response Theory Models for Bounded Continuous Data. Journal of Educational and Behavioral Statistics, 47, 693-735. doi:10.3102/10769986221108455

Noel, Y., & Dauvier, B. (2007). A beta item response model for continuous bounded responses. Applied Psychological Measurement, 31(1), 47-73. doi:10.1177/0146621605287691

Samejima, F. (1969). Psychometric monograph: Vol. 17. Estimation of ability using a response pattern of graded scores. The Psychometric Society. doi:10.1007/BF03372160

Stan Development Team (2025). RStan: the R interface to Stan. R package version 2.32.7. https://mc-stan.org/


Abasement data

Description

Bounded continuous items responses of 244 subjects to the 10 items from the Abasement subscale of the Adjectives Check List (ACL; Gough & Heilbrun, 1980)

Format

The item scores have originally been scored on a 60 milimeter line segment on which the subjects had to indicate to what degree each adjective applies to them. These scores have been recoded into a [0,1] interval. The Abasement scale does not contain 1 scores but it does contain 0 scores. All subscales of the ACL including the Abasement scale have been analyzed using bounded continuous IRT models with zero-one inflation by Molenaar et al. (2022; see Table 10 for the model fit statistics of all ACL subscales and see Table 11 for the parameter estimates of the Abasement scale).

References

Gough, H. G., & Heilbrun, A. B. (1980). The adjective check list, manual 1980 Edition. Consulting Psychologists Press.

Molenaar, D., Cúri, M., & Bazán, J.L. (2022). Zero and One Inflated Item Response Theory Models for Bounded Continuous Data. Journal of Educational and Behavioral Statistics, 47, 693-735. doi:10.3102/10769986221108455

See Also

fitBIRT to estimate various bounded continuous IRT models to data.

plot.BoundIRT to plot the item and test information curves and predicted densities for the different models.

coef.BoundIRT to extract item parameter estimates from a BoundIRT object.

bridgeBIRT to use bridge sampling to calculate the marginal loglikelihood for a model in a BoundIRT object. Additionally provides the WAIS, and DIC for model fit assessment.

latregBIRT to conduct a latent regression of the person parameters on some observed predictor variables.

rBIRT simulate data according to a (zero/one inflated) bounded IRT model.

Examples


data(Abasement)


Estimate fully marginalized log-likelihood using bridge sampling.

Description

This function function uses bridge sampling as discussed by Gronau et al. (2017) to obtain the fully marginalized likelihood of an estimated bounded IRT model. The function also outputs the Watanabe–Akaike information criterion (WAIC), the deviance information criterion (DIC).

Usage

bridgeBIRT(object,niter=10000,tol=1e-7,silent=FALSE)

Arguments

object

A BoundIRT-object.

niter

Number of iterations of the algorithm.

tol

Tolerence for the algorithm. Algorithm stops if the change in \log(r_1) between subsequent iterations is smaller than this value, see Details.

silent

If TRUE no progress is displayed during estimation.

Details

In bridge sampling, a so-called bridge function is used to estimate the fully marginalized likelihood by combining existing posterior samples with additional samples drawn from a proposal distribution. In bridgeBIRT, a multivariate normal proposal distribution is used. Using these proposal samples, the final expression for the marginal likelihood involves an iterative procedure (see Equation 4.1 from Meng & Wong, 1996) which stops if the change in marginal likelihood between iterations does not exceed the tollerence.

To improve numerical stability and avoid overflow in the exp() function, we follow the approach described in Appendix B of Gronau et al. (2017). Specifically, the median log-likelihood value, l^\star, is subtracted from the log-marginal likelihood, and only the remaining component, r_1, is estimated. After the iterative scheme has converged, these two components are recombined to obtain the final estimate of the marginal likelihood.

Value

A list containing:

log_ml

The fully marginalized log-likelihood.

DIC

The Deveiance Information Crierion (Spiegelhalter et al., 2002).

WAIC

The Wantabe Information Criterion (Watanabe, 2010).

r1

The estimate of r_1.

l_start

The value of l^\star used (median log-likelihood across posterior samples).

Author(s)

Dylan Molenaar d.molenaar@uva.nl

References

Gronau, Q. F., et al. (2017). A tutorial on bridge sampling. Journal of mathematical psychology, 81, 80-97. doi:10.1016/j.jmp.2017.09.005

Meng, X. L., & Wong, W. H. (1996). Simulating ratios of normalizing constants via a simple identity: a theoretical exploration. Statistica Sinica, 6, 831-860. https://www.jstor.org/stable/24306045

Spiegelhalter, D. J., Best, N. G., Carlin, B. P., & van der Linde, A. (2002). Bayesian measures of model complexity and fit (with discussion). Journal of the Royal Statistical Society Series B, 64, 583-640. doi:10.1111/1467-9868.00353

Watanabe, S. (2010). Asymptotic equivalence of Bayes cross validation and widely applicable Information criterion in singular learning theory. Journal of Machine Learning Research, 11, 3571-3594. https://www.jmlr.org/papers/volume11/watanabe10a/watanabe10a.pdf

See Also

fitBIRT to estimate various bounded continuous IRT models to data.

plot.BoundIRT to plot the item and test information curves and predicted densities for the different models.

coef.BoundIRT to extract item parameter estimates from a BoundIRT object.

latregBIRT to conduct a latent regression of the person parameters on some observed predictor variables.

rBIRT simulate data according to a (zero/one inflated) bounded IRT model.

Examples


  
  # read in the pre-estimated object containing the Ambasement results
  # for the Beta IRT model and estimate the marginal likelihood
  
  data(out_beta)
  bridgeBIRT(out_beta)
  
  


Obtain item parameter estimates

Description

Extracts a matrix of posterior means for the item parameters of a BoundIRT-object

Usage

## S3 method for class 'BoundIRT'
coef(object,sd=FALSE, ...)

Arguments

object

A BoundIRT-object.

sd

A Boolean indicating if posterior standard deviations should be returned as well

...

Other arguments to be passed to print()

Value

A matrix containing the posterior mean (and standard deviations if sd=TRUE) of the item parameters from a bounded IRT model fit with the fitBIRT() function.

Author(s)

Dylan Molenaar d.molenaar@uva.nl

See Also

fitBIRT to estimate various bounded continuous IRT models to data.

plot.BoundIRT to plot the item and test information curves and predicted densities for the different models.

coef.BoundIRT to extract item parameter estimates from a BoundIRT object.

bridgeBIRT to use bridge sampling to calculate the marginal loglikelihood for a model in a BoundIRT object. Additionally provides the WAIS, and DIC for model fit assessment.

latregBIRT to conduct a latent regression of the person parameters on some observed predictor variables.

rBIRT simulate data according to a (zero and/or one inflated) bounded IRT model.

Examples


  # read in the pre-estimated objects containing the Ambasement results
  data(out_beta)

  coef(out_beta)



Fit various IRT models for bounded continuous items to data

Description

This function fits various IRT models for bounded continuous items using MCMC sampling in R-package 'rstan' (Stan Development Team, 2025). Available models include the Beta IRT model by Noel and Dauvier (2007), the continuous response model by Samejima (1973), the unbounded normal model by Mellenbergh (1994), and the Simplex IRT model by Flores et al. (2020). All models can be fitted with or without a zero and/or one inflation (Molenaar et al., 2022).

Usage

fitBIRT(z,
        model=c("beta","samejima","simplex","normal"),
        inflated=c("auto","zero","one","both","none"),
        iter=2000,
        warmup=NULL,
        nchains=1,
        silent=FALSE,
        ...)

Arguments

z

A matrix of size N by n containing the bounded continuous item scores, where N is the number of subjects and n is the number of items. The items should be coded in a (0,1), a [0,1), a (0,1], or [0,1] interval.

model

A character string indicating the model to be fit. The options are:

"beta"

(Default) The Beta IRT model by Noel and Dauvier (2007) with item specific discrimination parameter.

"samejima"

The IRT model by Samejima (1973).

"simplex"

The Simplex IRT model by Flores et al. (2020).

"normal"

The (unbounded) unidimensional normal linear factor model by Mellenbergh (1994)

inflated

A character string indicating the kind of inflation to use. The options are:

"auto"

(Default) Zero and one inflation parameters are only added for items that actual contain zero and/or one scores .

"zero"

Zero inflation parameters are estimated for all items.

"one"

One inflation parameters are estimated for all items.

"both"

Zero and one inflation parameters are estimated for all items.

"none"

No zero-one inflation. The data shouldn't contain 0 or 1 scores.

iter

Number of MCMC samples to draw, including warmup samples

warmup

Number of warmup samples. Default is floor(iter/2)

nchains

Number of MCMC chains to use. Default is 1.

silent

If TRUE no details are displayed during estimation

...

Additional arguments to pass to rstan::samping()

Details

Function fitBIRT fits the models discussed by Molenaar et al. (2022) including the facilities for zero and/or one inflation. If \alpha_{i}, \beta_{i}, and \phi{i} are respectively the discrimination, easiness, and dispersion parameters of item i, \theta_{p} is the latent variable position of subject p, and z_{pi} is the bounded continuous item score of subject p on item i, then the different models can be given as follows:

Beta model

z_{pi} \sim \text{Beta} (a_{pi},b_{pi})

a_{pi} = \exp(.5(\alpha_{i}\theta_{p}+\beta_{i} + \log(\phi_i)))

b_{pi} = \exp(.5(-\alpha_{i}\theta_{p}-\beta_{i} + \log(\phi_i)))

Samejima model

z_{pi}^{'} \sim \text{Normal} (\alpha_{i}\theta_{p}+\beta_{i},\phi_i)

z_{pi}^{'} = \text{logit}(z_{pi})

Simplex model

z_{pi} \sim \text{Simplex}(1/(1+\exp(-(\alpha_{i}\theta_{p}+\beta_{i}))),\phi_i)

Normal model

z_{pi} \sim \text{Normal} (\alpha_{i}\theta_{p}+\beta_{i},\phi_i)

Zero and/or one inflation

To these models, zero and/or one inflation can be added as follows:

A = P(z_{pi}=0|\theta_{p}) = 1/(1+\exp(-(\gamma_{0i}-\alpha_{i}*\theta_{p})))

B = P(z_{pi}=1|\theta_{p}) = 1-1/(1+\exp(-(\gamma_{1i}-\alpha_{i}*\theta_{p})))

where \gamma_{0i} and \gamma_{1i} model the amount of zero and one inflation respectively. The conventional models above are accomodated as follows:

f(z_{pi}|\theta_{p}) = [ (1-B) - A ] \times k(z_{pi}|\theta_{p})

where k(.) is the distribution according to the conventional model above. See Molenaar et al. (2022) for details.

Value

An object of class BoundIRT with values:

output

The posterior means and standard deviations of the item parameters.

theta

The posterior means and standard deviations of the person parameters.

mcmc

The stanfit object containing all sampling results. See stanfit.

For the BoundIRT object, the following mehtods are available:

summary.BoundIRT

which gives the default rstan summary overview of the parameters.

plot.BoundIRT

which provides various IRT plotting facilities, see plot.BoundIRT

print.BoundIRT

which gives the posterior means and standard deviations of the item parameters.

coef.BoundIRT

which returns the posterior means of the item parameters, see coef.BoundIRT.

Author(s)

Dylan Molenaar d.molenaar@uva.nl

References

Flores, S., Bazan, J.L., & Bolfarine, H. (2020). A hierarchical joint model for bounded response time and response accuracy. In M. Wiberg, D. Molenaar, J. González, U. Bockenholt, & K. S. Kim (Eds.), Quantitative psychology: The 84th Annual Meeting of the Psychometric Society, Santiago de Chile, Chile (pp. 95-109). Springer. doi:10.1007/978-3-030-43469-4_8

Mellenbergh, G. J. (1994). A unidimensional latent trait model for continuous item responses. Multivariate Behavioral Research, 29(3), 223-236. doi:10.1207/s15327906mbr2903_2

Molenaar, D., Cúri, M., & Bazán, J.L. (2022). Zero and One Inflated Item Response Theory Models for Bounded Continuous Data. Journal of Educational and Behavioral Statistics, 47, 693-735. doi:10.3102/10769986221108455

Noel, Y., & Dauvier, B. (2007). A beta item response model for continuous bounded responses. Applied Psychological Measurement, 31(1), 47-73. doi:10.1177/0146621605287691

Samejima, F. (1969). Psychometric monograph: Vol. 17. Estimation of ability using a response pattern of graded scores. The Psychometric Society. doi:10.1007/BF03372160

Stan Development Team (2025). RStan: the R interface to Stan. R package version 2.32.7. https://mc-stan.org/

See Also

plot.BoundIRT to plot the item and test information curves and predicted densities for the different models.

coef.BoundIRT to extract item parameter estimates from a BoundIRT object.

bridgeBIRT to use bridge sampling to calculate the marginal loglikelihood for a model in a BoundIRT object. Additionally provides the Watanabe–Akaike information criterion (WAIC), the deviance information criterion (DIC) for model fit assessment.

latregBIRT to conduct a latent regression of the person parameters on some observed predictor variables.

rBIRT simulate data according to a (zero/one inflated) bounded IRT model.

Examples

 #load the Abasement data which contains zero inflation
 data(Abasement)

 # fit a zero inflated beta IRT model
 # for illustrative purposes, we only use 20 iterations.
 # In practice use many more!

 res=fitBIRT(Abasement,model="beta",iter=20)
 print(res)   # quick overview
 coef(res)   # extract posterior item parameter means
 summary(res,c("alpha","beta"))   # request the rstan summary



Latent regression of the latent variable from a bounded IRT model on observed predictor variables

Description

This function takes a fitted BoundIRT object and subjects the posterior latent variable distribution to a linear regression model.

Usage

latregBIRT(formula, X, BoundIRT.object, method=c("posterior","Croon"), nboot=1000)

Arguments

formula

A formula to specify the linear regression of the latent variable on the predictor variables in X. The formula should use theta for the latent variable, i.e., theta ~ .

X

A matrix of predictor variables. The column names of the matrix should at least include the predictor names provided in formula. All other variables are ignored.

BoundIRT.object

A BoundIRT object obtained with fitBIRT().

method

The method to conduct the latent regression. Default is "posterior" which uses the posterior latent variable draws. Other option is "Croon" and "CroonSE" which uses the correction by Croon (2002). See Details.

nboot

The number of bootstrap samples for method="Croon". See Details.

Details

By default (method="posterior"), latregBIRT fits a linear regression model to the posterior latent variable distribution from a bounded continuous IRT model:

\theta=\bold{x\gamma}+\epsilon

where \bold{x} is a vector of predictors variables, \bold{\gamma} is a vector of regression parameters, and \epsilon is a vector of residuals. Using the existing draws from the posterior latent variable distribution, \tilde{\theta} in BoundIRT.object, samples are drawn from the posterior of \bold{\gamma} conditional on \tilde{\theta}. This posterior is normal with it's mean being equal to the least square estimate of \bold{\gamma}, and it's variance equal to V\sigma^2 where V is the inverse of cov(X), and \sigma^2 is the residual variance which is sampled from it's scaled inverse-chi-square posterior distribution. Note that the posterior of the latent variable is misspecified with respect to the predictor variables. The posterior is however unbiased for the number of items approaching infinity. As most applications of (bounded continuous) IRT models typically involve a limited number of items, the posterior covariance matrix of the latent variable and the predictor variables is adjusted for the nonzero variance in the latent variable posterior. The correction is based on the two-step approach by Croon (2002) in which the factor scores from a linear factor model are estimated in step 1 and used in a regression model in step 2. As such, Croon's method is a statistical valid alternative to fitting the factor model and latent regression model simultaneously. Vermunt (2025) discusses how Croon's method can be generalized to models with heterogenous measurement error like IRT models. latregBIRT implements this idea by correcting the covariance matrix of the latent variable and the predictor variables for each posterior latent variable draw using the formula from Vermunt (2025). Next, a linear regression is fit to each sample as described above.

For method="Croon" the above correction is applied on the EAP latent variable scores. Drawback is that no standard deviation corrections are available. These are therefore bootstrapped using nboot resamples.

Value

output

A matrix containing the postrior means and standard deviations of the regression slopes for each predictor (if method="posterior") or the regression slope estimates with boostrapped standard errors (if method="Croon").

samples

A matrix containing the samples from the postrior distribution of the regression parameter (if method="posterior") or the regression parameter estimates on the bootstrapped samples (if method="Croon").

Author(s)

Dylan Molenaar d.molenaar@uva.nl

References

Croon, M. (2002). Using predicted latent scores in general latent structure models. In G. Marcoulides and I. Moustaki (Eds.), Latent Variable and Latent Structure Models (pp. 195-224). Lawrence Erlbaum.

Vermunt J.K. (2025). Stepwise estimation of latent variable models: An overview of approaches. Statistical Modelling, 25(6),530-551. doi:10.1177/1471082X251355693

See Also

fitBIRT to estimate various bounded continuous IRT models to data.

plot.BoundIRT to plot the item and test information curves and predicted densities for the different models.

coef.BoundIRT to extract item parameter estimates from a BoundIRT object.

bridgeBIRT to use bridge sampling to calculate the marginal loglikelihood for a model in a BoundIRT object. Additionally provides the Watanabe–Akaike information criterion (WAIC), the deviance information criterion (DIC) for model fit assessment.

rBIRT simulate data according to a (zero/one inflated) bounded IRT model.

Examples


 # open pre-estimated Beta IRT model on Abasement data (see ?Abasement)
  data(out_beta)

 # simulate a latent regression with 2 covariates

 EAP=out_beta$theta[,1]
 N=length(EAP)
 age=.4*EAP+sqrt(1-.4^2)*rnorm(N)
 ses=.3*EAP+sqrt(1-.3^2)*rnorm(N)

 # conduct latent regression
 predictors=cbind(age,ses)
 latregBIRT(theta~age+ses,predictors,out_beta)


Estimation results of a Zero Inflated Beta IRT model fit to the Abasement data

Description

The object returned by fitBIRT containing the results of a zero inflated beta IRT model fit to the Abasement data of the Adjectives Check List (ACL; Gough & Heilbrun, 1980). The Abasement scale has been analyzed using a zero-one inflated beta IRT model by Molenaar et al. (2022). See Table 10 for the model fit statistics of all ACL subscales including the Abasement subscale and see Table 11 for the parameter estimates of the Abasement scale. Note that the estimates in out_beta and the subsequent model fit statistics obtained using bridgeBIRT are based on a zero inflated model only, therefore, results are slightly different.

Format

A BoundIR object obtained using

z=data(Abasement) out_beta=fitBIRT(z,model="beta")

References

Gough, H. G., & Heilbrun, A. B. (1980). The adjective check list, manual 1980 Edition. Consulting Psychologists Press.

Molenaar, D., Cúri, M., & Bazán, J.L. (2022). Zero and One Inflated Item Response Theory Models for Bounded Continuous Data. Journal of Educational and Behavioral Statistics, 47, 693-735. doi:10.3102/10769986221108455

See Also

fitBIRT to estimate various bounded continuous IRT models to data.

plot.BoundIRT to plot the item and test information curves and predicted densities for the different models.

coef.BoundIRT to extract item parameter estimates from a BoundIRT object.

bridgeBIRT to use bridge sampling to calculate the marginal loglikelihood for a model in a BoundIRT object. Additionally provides the WAIS, and DIC for model fit assessment.

latregBIRT to conduct a latent regression of the person parameters on some observed predictor variables.

rBIRT simulate data according to a (zero/one inflated) bounded IRT model.

Examples


data(out_beta)


Plotting function for BoundIRT-objects.

Description

This function can be used to produce item and test information curves, and the model implied densities of a fitted bounded continuous IRT model.

Usage

## S3 method for class 'BoundIRT'
plot(x,
                        what=c("icc","iic","tic","density"),
                        items=NULL,
                        seperate=FALSE,
                        range=c(-3,3),
                        by=.001,
                        ymax=NULL,
                        xlab=NULL,
                        ylab=NULL,
                        main=NULL,
                        col=NULL,
                        lwd_prob=2,
                        ...)

Arguments

x

A BoundIRT-object to produce the plots for.

what

A character string indicating what plot to produce. The options are:

"icc"

(Default) Item characteristic curves.

"iic"

Item information curves.

"tic"

Test information curves.

"density"

The model implied density for the observed data.

items

A numeric vector indicating which items to consider for the plots. If NULL all items are plotted (default). If items is provided and what="tic", the test information is based only on these items.

seperate

If seperate=TRUE the different items are depicted in seperate plots

range

Range of the latent variable on the x-axis. Argument will be neglected for what="density".

by

increment for the x-axis of the plot.

ymax

Specify the maximum value for the y-axis. For multiple items, this can be an array of size length(items), or a single value for all items.

xlab

Specify an alternative label for the x-axis.

ylab

Specify an alternative label for the y-axis.

main

Specify an alternative title for plot.

col

The color code to be used for plotting different items. Can be an array and will be recycled if length(items)!=length(col). Argument can be any valid R color specification. Default is 1:6.

lwd_prob

For what="density" and a model with zero and/or one inflation, the probabilities of zero and one scores are depicted using vertical lines. The width of these lines can be set using this argument. Default is 2. Width of the other lines can be set using ... below.

...

Other arguments to be passed to matplot

.

Details

Plotting the model implied densities is relatively slow due to the numerical integration involved in marginalizing over the latent variable. In the presence of zero and/or one inflation, model implied densities inclulde the probability of zero and/or one scores by a vertical line. As this vertical line represents a probability and the rest of the plot is about density, the zero/one probabilities may be masked if density values are large even if the zero/one inflation is quite substantial. See Examples how to extract the zero/one probabilities in the case these are hard to see from the plot.

Value

A matrix containing x-axis values (either the latent variable or the observed variable) and the y-axis values for each item.

Author(s)

Dylan Molenaar d.molenaar@uva.nl

See Also

fitBIRT to estimate various bounded continuous IRT models to data.

coef.BoundIRT to extract item parameter estimates from a BoundIRT object.

bridgeBIRT to use bridge sampling to calculate the marginal loglikelihood for a model in a BoundIRT object. Additionally provides the WAIS, and DIC for model fit assessment.

latregBIRT to conduct a latent regression of the person parameters on some observed predictor variables.

rBIRT simulate data according to a (zero/one inflated) bounded IRT model.

Examples


 #load results for zero inflated beta IRT model fit to the Abasement data
 # see ?Abasement and ?out_beta
 data(out_beta)

 # plots for item 1
 oldpar=par(mfrow=c(2,2))
 plot(out_beta,what="icc",items=1)
 plot(out_beta,what="iic",items=1)
 plot(out_beta,what="tic",items=1)
 den_plot=plot(out_beta,what="density",items=1)
 par(oldpar)

 #extract zero probabilities (there are no ones in the Abasement data)
 den_plot$out[1]        # zero probabilities


Simulate data according various IRT models for bounded continuous items to data

Description

This function simulates data according to various IRT models for bounded continuous items. Available models include the Beta IRT model by Noel and Dauvier (2007), the continuous response model by Samejima (1973), the unbounded normal model by Mellenbergh (1994), and the Simplex IRT model by Flores et al. (2020). All models can be simulated with or without zero and/or one inflation (Molenaar et al., 2022).

Usage

rBIRT(N,nit,alpha,beta,phi,theta,
      gamma0=NULL,
      gamma1=NULL,
      model=c("beta","samejima","simplex","normal"))

Arguments

N

Number of subjects

nit

Number of items

alpha

A nit-dimensional array of true discrimination parameter values

beta

A nit-dimensional array of true easiness parameter values

phi

A nit-dimensional array of true dispersion parameter values

theta

A N-dimensional array of true person parameter values

gamma0

Optional: A nit-dimensional array of true zero inflation parameters

gamma1

Optional: A nit-dimensional array of true one inflation parameters

model

A character string indicating what model to use to simulate the data. The options are:

"beta"

(Default) The Beta IRT model by Noel and Dauvier (2007) with item specific discrimination parameter.

"samejima"

The IRT model by Samejima (1973).

"simplex"

The Simplex IRT model by Flores et al. (2020).

"normal"

The (unbounded) unidimensional normal linear factor model by Mellenbergh (1994)

Details

If arguments gamma0 and gamma1 are not provided, data is simulated according to the conventional models. Zero and one inflation can be introduced seperately by only providing gamma0 or gamma1, or zero and one inflation can both be introduced by specifying both gamma0 and gamma1. If the interest is in simulating some -but not all- items with zero and/or one inflation, the uninflated items can be coded as -Inf in gamma0 and Inf in gamma1. See fitBIRT for the exact parameterization of the models.

Value

A matrix of size N by nit containing the simulated item responses.

Author(s)

Dylan Molenaar d.molenaar@uva.nl

References

Flores, S., Bazan, J.L., & Bolfarine, H. (2020). A hierarchical joint model for bounded response time and response accuracy. In M. Wiberg, D. Molenaar, J. González, U. Bockenholt, & K. S. Kim (Eds.), Quantitative psychology: The 84th Annual Meeting of the Psychometric Society, Santiago de Chile, Chile (pp. 95-109). Springer. doi:10.1007/978-3-030-43469-4_8

Mellenbergh, G. J. (1994). A unidimensional latent trait model for continuous item responses. Multivariate Behavioral Research, 29(3), 223-236. doi:10.1207/s15327906mbr2903_2

Molenaar, D., Cúri, M., & Bazán, J.L. (2022). Zero and One Inflated Item Response Theory Models for Bounded Continuous Data. Journal of Educational and Behavioral Statistics, 47, 693-735. doi:10.3102/10769986221108455

Noel, Y., & Dauvier, B. (2007). A beta item response model for continuous bounded responses. Applied Psychological Measurement, 31(1), 47-73. doi:10.1177/0146621605287691

Samejima, F. (1969). Psychometric monograph: Vol. 17. Estimation of ability using a response pattern of graded scores. The Psychometric Society. doi:10.1007/BF03372160

Stan Development Team (2025). RStan: the R interface to Stan. R package version 2.32.7. https://mc-stan.org/

See Also

fitBIRT to estimate various bounded continuous IRT models to data.

plot.BoundIRT to plot the item and test information curves and predicted densities for the different models.

coef.BoundIRT to extract item parameter estimates from a BoundIRT object.

bridgeBIRT to use bridge sampling to calculate the marginal loglikelihood for a model in a BoundIRT object. Additionally provides the Watanabe–Akaike information criterion (WAIC), the deviance information criterion (DIC) for model fit assessment.

latregBIRT to conduct a latent regression of the person parameters on some observed predictor variables.

Examples


 # data sim with 100 subjects and 10 items according to
 # beta IRT model with zero and one inflation

 nit=10
 N=100
 beta=runif(nit,.5,1)
 alpha=runif(nit,.5,.7)
 gamma0=runif(nit,-3,-1.5)
 gamma1=runif(nit,1.5,3)

 theta=rnorm(N)

 phi=seq(1.5,2.5,length=nit)
 z=rBIRT(N,nit,alpha,beta,phi,theta,gamma0,gamma1,model="beta")