# 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

*25 juin 2018*

* *

# Last publications

*06 juin 2018*__ Tessier P__*The European Journal of Health Economics*: .

*06 juin 2018*__ Tessier P__*BMJ Open*, **8**(2): .

*15 mai 2018*__ Maruani A__*Oral Dis*, **24**(4): 552-60.

*15 mai 2018*__ Sautenet B__*Am J Kidney Dis*, **71**(5): 690-700.

*02 mai 2018* __ Hardouin JB__*Trials*, **19**(1): 260.

# Updated

20 juin 2018# The Stata module "Raschtest"

# Description

**Raschtest** estimates the parameters of a Rasch model. The estimation method can be chosen between conditional maximum likelihood (CML), marginal maximum likelihood (MML) and generalized estimating equations (GEE). **raschtest** offer a set of tests, to valuate the fit of the data to the Rasch model, or detect non homogeneous items (Andersen Z test, First order test (Q1, R1c, R1m, or Wright Panchapakesan), U test, Split test) and indexes (OUTFIT and INFIT per items or per individuals). Several graphical representations can be easily obtained: comparison of the observed and theorical Item Characteristic Curves (ICC), Map difficulty parameters/Scores, results of the split tests, and information function. **raschtestv7** is a version of **raschtest** for Stata 7.

# Download

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

# Syntax (version 8.7)

**raschtest** *varlist* [**if** *expr*] [**in** *range*] [, ** method**(

*cml/mml/gee*)

**(**

__t__est*R/Q/WP*)

__mean__diff

__d__etail**(**

__group__*numlist*)

__autog__roup**(**

__dir__save*directory*)

__files__saves

__pau__se

__rep__lace

__icc__

__gra__ph

__inf__ormation

__split__test

__fit__graph**(**

__genlt__*newvarname*)

**(**

__gensco__re*newvarname*)

**(**

__genfit__*newvarlist*)

**(**

__comp__*varname*)

__tr__ace**(**

__dif__*varlist*)

__nold__**(**

__id__*varname*)

__time__**(**

__diff__iculties*vector*)

**(**

__iterate__*#*)

**(**

__cov__artiates*varlist[, ss1 ss3]*)

**(**

__genres__*string*) ]

# Notes

This program requires an access to the following program(s):

**: ssc install raschtestv7**

__raschtestv7__**: ssc install gammasym**

__gammasym__**: ssc install gausshermite**

__gausshermite__**: ssc install geekel2d**

__geekel2d__**: ssc install genscore**

__genscore__**: findit ghquadm**

__ghquadm__**: ssc install gllamm**

__gllamm__**: with gllamm**

__gllapred__**: ssc install elapse**

__elapse__**Raschtestv7** is a version of **raschtest** for Stata 7.

You can see here an exemple of outputs produced by raschtest.

# Options:

(__m__ethod*cml/mml/gee*): specifies the used method to estimate the difficulty parameter among CML (*cml*- by default), MML (*mml*) or GEE (*gee*).(__t__est*R/Q/WP*): specifies the tests to use among*R*(by default, for the R1c or the R1m test),*WP*(for the Wright-Panchapakesan test) and*Q*(for the Q1 test).: centers the difficulty parameters (only with__mean__diff**method**(*cml*): by default for the CML estimations, the difficulty parameter to the last item is fixed to 0. With**meandiff**, only the diagonal elements of the covariance matrix of these parameters are estimated.: displays for each group of scores a table containing the observed and expected number of positive responses and the contribution of this group to the global first-order statistic__d__etail(__group__*numlist*): specifies groups of scores, by defining the superior limits of each group (note that the nul score (0) and this one corresponding to the number of items (number of items) are always isolated): automatically creates groups of scores (with at least 30 individuals per group)__autog__roup(__dir__save*directory*): specifies the directory where the graphs will be saved (by default, the directory defined in c(pwd)): saves all the graphs in .gph files (by default, the graphs are not saved)__files__saves: makes a pause between the displaying of each graph__pau__se: specifies that the existing graphical files will be replaced__rep__lace: displays, for each item, the observed and expected (under the Rasch model) ICC in a graph__icc__: (not available with__gra__ph**raschtestv7**) represents in the same graph the distributions of the difficulty parameters, this one of the scores, and [with MML or GEE] the expected distribution of the latent trait, as a function of the latent trait: represents the information function for the set of the items in function of the latent trait__inf__ormation: represents, for each item, the CML estimations of the difficulty parameters for the others items in the two sub-samples defined by the individuals who have positively respond to the splitting item for the first group, and by the individuals who have negatively respond to the splitting item for the second one__split__test: represents four graphs. The first one concerns the OUTFIT indexes for each item, the second one, the INFIT indexes for each item, the third one the OUTFIT indexes for each individual, and the last one the INFIT indexes for each individual__fit__graph(__genlt__*newvarname*): creates a new variable containing, for each individual, the estimated value of the latent trait(__gensco__re*newvarname*): creates a new variable containing, for each individual, the value of the score(__genfit__*newvarlist*): creates several new variables. newvarlist must contain two words. The first one represents 'outfit' and the second one 'infit'. This option generates two variables with this names for the OUTFIT and INFIT indexes for each individual, and the variables 'outfitXX' (by replacing 'outfit' by the first word) for the contribution of the item XX to the OUTFIT index (Note that the new variables contain unstandardized OUTFIT and INFIT indices, even the program displays standardized statistics in the results table and with the**fitgraph**option).(__comp__*varname*): tests the equality of the means of the latent trait for two groups of individuals defined by a binary variable (only with**method**(*mml*) or**method**(*gee*)).: displays more outputs during the running of the module__tr__ace(__dif__*varlist*): tests the Differential Item Functioning (DIF) on a list of variables by likelihood ration tests. For each variable defined in the list, the items parameters are estimated in each groups defined by this variable, and the test considers the null assumption: the estimations are the same in each group. The statistic of the test follows a chi-square distribution under the null assumption. The variable defined in the**dif**option must have 10 or less modalities, coded from 0 or 1 to an integer k<=10. This option is available only if**method**(*cml*).: Avoids listwise deletion (LD) of the individuals with missing data: all the observed responses are kept for the estimation process (except for__nold__**meth**(*gee*)). Nevertheless, the individuals with missing data are omitted for computing fit tests.(__id__*varname*): (required) defined an identifiant variable of the individuals: displays the number of seconds to run the module__time__(__diff__iculties*vector*): allows fixing the values of the difficulties parameters of the items. The vector must be a row vector and must contain as many values as items. This option is available only with**method**(*mml*)(__iterate__*#*): allows defining the maximal number of iterations of the maximisation algorithm. By default, this number is fixed to 200.(__cov__artiates*varlist[, ss1 ss3]*): allows introducing covariates on the model. The**ss1**and**ss3**options allows computing the type 1 and type 3 sums of squares to explain the variance of the latent trait by these covariates. This option is available only with**method**(*mml*).(__genres__*string*): creates new variables containing, for each individual, the value of the residuals. This option defines the prefix to these new variables which will be followed by the name of each item.

# Examples:

**raschtest itemA*,id(id)**

**raschtest itemA* itemB2, id(id) method(gee) information icc dirsave(c:\\graphs) filesnames(graphs)**

**raschtest itemA1 itemA2 itemA3-itemA7 itemB* ,id(id) group(2 3 4 5) test(WP) split graph**

# Outputs:

**: Number of observations**

__e(N)__**: (Marginal) Log-likelihood**

__e(ll)__**: Conditional log-likelihood**

__e(cll)__**: Akaike Information Criterion**

__e(AIC)__**: Estimated standard deviation of the latent trait**

__e(sigma)__**: Standard error of the estimated standard deviation of the latent trait**

__e(sesigma)__**: Estimated difficulty parameters**

__e(beta)__**: Covariance matrix of the estimated difficulty parameters**

__e(Varbeta)__**: Estimated values for the latent trait for each value of the score**

__e(theta)__**: Covariance matrix for the estimated values for the latent trait for each value of the score**

__e(Vartheta)__**: Statistics of fit for each item (first order statistic, degree of freedom, p-value, OUTFIT index, INFIT index, and (if**

__e(itemFit)__**method**(

*cml*) U-test statistic

**: Global first order test (statistic, degrees of freedom, p-value)**

__e(globalFit)__**: Andersen LR Z test (statistic, degree of freedom, p-value) (if**

__e(AndersenZ)__**method**(

*cml*))

**: DIF LR Z test (statistic, degree of freedom, p-value for each variable defined in**

__r(DIF)__**dif**) (if

**method**(

*cml*))

**: Statistic of the test (with the**

__e(Zcomp)__**comp**option)

**: P-value of the test (with the**

__e(pZcomp)__**comp**option)

# Historic

- Correction of a bug in the
**covariates**option with ss1 and ss3

- Minor corrections

**Genres**option

**Difficulties**and**Covariates**options

**nold**option (allows estimating difficulty parameters by taking account the individuals with missing values)- Correction of a bug when the
**genlt**or**genscore**options are used in the same time than a**if** - Outputs with the
**comp**option

- Standardized INFIT and OUTFIT statistics
**DIF**option to test the Differential Item Functioning- Corrections when scores are not represented

- Options system corrections
- Individual values of the latent trait estimated by Weighted Likelihood Estimator instead by Maximum Likelihood Estimator in the CML case

- Full of improvements (ICC, outputs, algorithm...)
- Fit tests R1c and R1m of Glas (1988)
- Split test and U test of Molenaar (1983)
- OUFIT and INFIT indexes per item or per individual
- Allows fixing the mean of the difficulty parameters to 0 (CML)

- Use the Stata module raschtestv7 version 7.1
- GEE estimation (the Stata module GEEkel2d is needed)
- Automatically create groups of scores such that each group is composed of at least 30 individuals

- Graphical representation of the distributions of the latent trait and of the difficulty parameters of the items
- Create variables containing the values of the latent trait and of the score
- Correction of the theorical traces with groups of scores

- No errors if scores are not represented

- No error messages if the null score is not represented

- Improvments to estimate the theorical number of good responses in the Q1 test (based on the symmetrical gamma function) (the program gammasym is needed)
- Andersen Z Fit test (1973)
- Formation of groups of scores for a better use of the Q1 test
- Fit test of Wright-Panchapakesan (test named Q1 in the anterior versions of this program)
- Q2 fit test of Van den Wollenberg (not completely validated)

- Estimation by conditional maximum likelihood (by default)

- Improvments
- No more identifiant variable
- New outputs

- Improvements

- Information graph of the scale

- Estimation of the parameters of a Rasch model
- Goodness of fit test Q1 of Van den Wollenberg
- Empirical and theorical traces of the items