ResearchTopics Publications In progress publications Communications
PackagesAnaQol Project PRO-online R Packages Online R-package
Life of the unitProjects Collaborations PhD thesis Traineeships Traineeships propositions Seminars
09 avril 2019
15 mars 2019
07 mars 2019
01 mars 2019
01 mars 2019
Updated22 mai 2019
The Stata module "Simirt"
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).
Type "findit simirt" or "ssc install simirt" directly from your Stata browser.
Syntax (version 3.5)
simirt [, nbobs(#) dim(# [#]...) mu(# [#]...) cov(# [# #]) diff(list_of_values_or_expression) disc(list_of_values) pmin(list_of_values) pmax(list_of_values) acc(list_of_values) clear store(filename) replace prefix(string [string]) draw group(#) deltagroup(#) rsm1((list_of_values)) rsm2(list_of_values) threshold covmatrix(matrix) pcm(matrix) id(newvarname) title(string) norandom ]
- nbobs(#): specifies the number of individuals to simulate. By default, 2000 individuals are simulated.
- dim(# [#]...): 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.
- diff(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.
- disc(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).
- clear: does not restore the initial dataset at the end of the command (at least one of the clear and store options must be defined).
- store(filename): defines the file where the new dataset will be stored (at least one of the clear and store options must be defined).
- replace: associated to store, allows replacing the file defined by store, if it already exist.
- prefix(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.
- draw: in the unidimensional case, this option allows drawing the Items Characteristic Curves on a graph.
- group(#): 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.
- deltagroup(#): 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.
- threshold: simulates the responses of each individuals directly from the latent trait. In a dichotomous model (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.
- covmatrix(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)
- title(string): defines the title of the graphs.
- norandom: allows affecting between the two groups the exact rates of individuals defined in the
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)