# Research

Topics Publications In progress publications Communications# Packages

AnaQol Project PRO-online R Packages Online R-package# Life of the unit

Projects Collaborations PhD thesis Traineeships Traineeships propositions Seminars# Next seminars

* *

* *

# Last publications

*25 juillet 2019*__ Bourdon M____ Blanchin M____ Sébille V____ Bonnaud-Antignac A__*Health psychology*: .

*28 juin 2019*__ Gérardin M____ Rousselet M____ Grall-Bronnec M____ Jolliet P____ Victorri-Vigneau C__*BMJ open*, **9**: e027443.

*01 juin 2019*__ Caillon J____ Grall-Bronnec M____ Perrot B____ Challet G__*J Gambl Stud*, **35**(2): 601-615.

*01 mai 2019*__ Perrot B__*Scandinavian Journal of Gastroenterology*, **8**: 1-7.

*11 avril 2019*__ Hardouin JB__*Ann Emerg Med*(19): 30147-7.

# Updated

19 août 2019# The Stata module "Simirt"

# Description

**Simirt** allows creating a new dataset of responses to items simulated by an unidimensional IRT model (Rasch, OPLM, Birnbaum, 3PLM, 4PLM, 5PAM, Rating Scale Model). It is possible to simulate two sets of items linked, for each of them, to a specific latent trait (which can be correlated).

# Download

Type "findit simirt" or "ssc install simirt" directly from your Stata browser.

# Syntax (version 3.5)

**simirt** [, ** nbobs**(

*#*)

**(**

__d__im*# [#]...*)

**(**

__mu__*# [#]...*)

**(**

__cov__*# [# #]*)

**(**

__dif__f*list_of_values_or_expression*)

**(**

__dis__c*list_of_values*)

**(**

__pmin__*list_of_values*)

**(**

__pmax__*list_of_values*)

**(**

__acc__*list_of_values*)

__clear__**(**

__sto__re*filename*)

__rep__lace**(**

__pref__ix*string [string]*)

__draw__**(**

__gr__oup*#*)

**(**

__del__tagroup*#*)

**(**

__rsm1__*(list_of_values)*)

**(**

__rsm2__*list_of_values*)

__thr__eshold**(**

__covm__atrix*matrix*)

**(**

__pcm__*matrix*)

**(**

__id__*newvarname*)

**(**

__tit__le*string*)

**]**

__norand__om# Options:

(__nbo__bs*#*): specifies the number of individuals to simulate. By default, 2000 individuals are simulated.(__d__im*# [#]...*): specifies the number of items linked to the first latent trait (and optionally to the second one). If this option is not defined, the**simirt**command simulates only one latent trait with a number of items equal to the number of values defined in the**diff**option (at least one of these two options must be defined).(__mu__*# [#]...*): specifies the mean(s) of each simulated latent trait.(__cov__*# [# #]*): defines the covariance matrix of the latent trait(s). If there is only one latent,**cov**is composed of the variance of this one, else, cov is composed of the variance of the first latent, followed by the variance of the second latent trait, and of the covariance.(__dif__f*list_of_values_or_expression*): defines the values of the difficulty parameters as a list of values (with a number of elements equal to the total number of items), or as an expression like uniform #A #B (to define these parameters as uniformly distributed in ]#A;#B[), or like gauss #M #V (to define these parameters as the percentiles of the gaussian distribution with mean #M and variance #V). If there is two latent traits, the expressions are defined as uniform #A1 #B1 #A2 #B2 and gauss #M1 #V1 #M2 #V2. If this option is not defined (but the**dim**option is), these parameters are defined among a standardized gaussian distribution.(__dis__c*list_of_values*): defines the discriminating values of the items (by default, these parameters are fixed to 1).(__pmin__*list_of_values*): defines the minimal probability of positive responses for each item (by default, these parameters are fixed to 0).(__pmax__*list_of_values*): defines the maximal probability of positive responses for each item (by default, these parameters are fixed to 1).(__acc__*list_of_values*): defines the accelerating parameters for each item (by default, these parameters are fixed to 1).: does not restore the initial dataset at the end of the command (at least one of the__clear__**clear**and**store**options must be defined).(__sto__re*filename*): defines the file where the new dataset will be stored (at least one of the**clear**and**store**options must be defined).: associated to__rep__lace**store**, allows replacing the file defined by**store**, if it already exist.(__pref__ix*string [string]*): allows defining the prefix to use for the names of the items. The string cannot contain space(s). By default, the used prefix is "item" in the unidimensional case, and "itemA" and "itemB" in the bidimensional case. A number follows these prefixes.: in the unidimensional case, this option allows drawing the Items Characteristic Curves on a graph.__draw__(__gr__oup*#*): defines, in the unidimensional case, two groups of patients, for example a "treated" group (coded 1) and a "reference" group (coded 0).**group**defines the expected proportion of individuals of the first group.(__del__tagroup*#*): defines, in the unidimensional case, the difference between the means of the latent trait between the two groups defined by the**group**option. This option is disabled if the**group**option is not defined. The variance of the latent trait is considered as equal in the two groups.(__rsm1__*(list_of_values)*): defines the parameters corresponding to the modalities 2 to K (bigger modality) for each item of the first dimension. If this option is specified, the data are dichotomous ones. The**rsm1**option cannot be combined with the**disc**,**pmin**,**pmax**,**acc**and**draw**options.(__rsm2__*list_of_values*): defines the parameters corresponding to the modalities 2 to K (bigger modality) for each item of the first dimension. If this option is specified, the data are dichotomous ones. The**rsm2**option cannot be combined with the**disc**,**pmin**,**pmax**,**acc**and**draw**options.: simulates the responses of each individuals directly from the latent trait. In a dichotomous model (__thr__eshold**disc**,**pmin**,**pmax**and**acc**options are not allowed), the response 1 if given as soon the latent trait of the individual is greater than the difficulty parameter of the item (defined with the diff option). In a polytomous model , an answer is given when the latent trait of the individual is greater than the difficulties corresponding to this answer.(__covm__atrix*matrix*): directly defines the covariance matrix of the latent trait(s). This option is required instead of the cov option as soon as the number of dimensions is greater than 2 (but this option could be used for one or two dimensions).(__pcm__*matrix*): defines a matrix containing as many rows as items and a column for each positive answer categorie. Elements of this matrix represents the difficulty parameters of the items in a Partial Credit Model.(__id__*newvarname*): defines the name of the identifiant variable (id by default)(__tit__le*string*): defines the title of the graphs.: allows affecting between the two groups the exact rates of individuals defined in the__norand__omgroup option.

# Examples:

**simirt , dim(7) clear**

**simirt , diff(gauss 0 1) dim(7) disc(.8 1.2 1.4 .6 1.4 1.0 1.1) clear**

**simirt , diff(uniform -2 3 0 1) dim(7 7) cov(2 4 1) clear**

**simirt , dim(7) clear group(.5) deltagroup(1)**

**simirt , dim(7) clear rsm(1 .5 .2)**

# Outputs:

**: Number of simulated individuals.**

__r(nbobs)__**: Empirical mean of the #th latent trait.**

__r(mean_#)__**: Empirical variance of the #th latent trait.**

__r(var_#)__**: Empirical covariance between the two latent traits (if there is two simulated dimensions).**

__r(cov_12)__**: Empirical correlation coefficient between the two latent traits (if there is two simulated dimensions).**

__r(rho)__**: number of latent traits**

__e(dimension)__# Historic

- Minor corrections

- Minor corrections,
**norandom**option

**pcm**option

**covmatrix**option

- Remove an useless output

- 3 dimensions + correction for the mu vector

- Title for the graphs

- Improvements for the simulation of the Rating Scale Models

- Corrections for the Rating Scale Model
- Thresholds models

- Allows simulating polytomous data with a Rating Scale Model (RSM)

- Allows simulating two groups of individuals with different value for the mean of the latent trait

- Simulation of the Rasch model, OPLM, Birnbaum model, 3PLM, 4PLM, 5PAM
- 1 or 2 latents traits, correlated or not