**[IRT] irt rsm** -- Rating scale model

__Syntax__

**irt rsm** *varlist* [*if*] [*in*] [*weight*] [**,** *options*]

*options* Description
-------------------------------------------------------------------------
Model
__list__**wise** drop observations with any missing items

SE/Robust
**vce(***vcetype***)** *vcetype* may be **oim**, __r__**obust**, __cl__**uster** *clustvar*,
__boot__**strap**, or __jack__**knife**

Reporting
__l__**evel(***#***)** set confidence level; default is **level(95)**
**notable** suppress coefficient table
__nohead__**er** suppress output header
*display_options* control columns and column formats

Integration
__intm__**ethod(***intmethod***)** integration method
__intp__**oints(***#***)** set the number of integration points; default
is **intpoints(7)**

Maximization
*maximize_options* control the maximization process; seldom used

__startv__**alues(***svmethod***)** method for obtaining starting values
__noest__**imate** do not fit the model; show starting values
instead
**dnumerical** use numerical derivative techniques
__coefl__**egend** display legend instead of statistics
-------------------------------------------------------------------------

*intmethod* Description
-------------------------------------------------------------------------
__mv__**aghermite** mean-variance adaptive Gauss-Hermite
quadrature; the default
__mc__**aghermite** mode-curvature adaptive Gauss-Hermite
quadrature
__gh__**ermite** nonadaptive Gauss-Hermite quadrature
-------------------------------------------------------------------------

**bootstrap**, **by**, **jackknife**, **statsby**, and **svy** are allowed; see prefix.
Weights are not allowed with the **bootstrap** prefix.
**vce()** and weights are not allowed with the **svy** prefix.
**fweight**s, **iweight**s, and **pweight**s are allowed; see weight.
**startvalues()**, **noestimate**, **dnumerical**, and **coeflegend** do not appear in
the dialog box.
See **[IRT] irt rsm postestimation** for features available after estimation.

__Menu__

**Statistics > IRT (item response theory)**

__Description__

**irt rsm** fits rating scale models to ordinal items. In the rating scale
model, items vary in their difficulty but share the same discrimination
parameter. The distances between the difficulties of adjacent outcomes
are equal across the items.

__Options__

+-------+
----+ Model +------------------------------------------------------------

**listwise** handles missing values through listwise deletion, which means
that the entire observation is omitted from the estimation sample if
any of the items are missing for that observation. By default, all
nonmissing items in an observation are included in the likelihood
calculation; only missing items are excluded.

+-----------+
----+ SE/Robust +--------------------------------------------------------

**vce(***vcetype***)** specifies the type of standard error reported, which
includes types that are derived from asymptotic theory (**oim**), that
are robust to some kinds of misspecification (**robust**), that allow for
intragroup correlation (**cluster** *clustvar*), and that use bootstrap or
jackknife methods (**bootstrap**, **jackknife**); see **[R]** *vce_option*.

+-----------+
----+ Reporting +--------------------------------------------------------

**level(***#***)**; see **[R] estimation options**.

**notable** suppresses the estimation table, either at estimation or upon
replay.

**noheader** suppresses the output header, either at estimation or upon
replay.

*display_options*: **noci**, __nopv__**alues**, **cformat(***fmt***)**, **pformat(%***fmt***)**,
**sformat(%***fmt***)**, and **nolstretch**; see **[R] estimation options**.

+-------------+
----+ Integration +------------------------------------------------------

**intmethod(***intmethod***)** specifies the integration method to be used for
computing the log likelihood. **mvaghermite** performs mean and variance
adaptive Gauss-Hermite quadrature; **mcaghermite** performs mode and
curvature adaptive Gauss-Hermite quadrature; and **ghermite** performs
nonadaptive Gauss-Hermite quadrature.

The default integration method is **mvaghermite**.

**intpoints(***#***)** sets the number of integration points for quadrature. The
default is **intpoints(7)**, which means that seven quadrature points are
used to compute the log likelihood.

The more integration points, the more accurate the approximation to
the log likelihood. However, computation time increases with the
number of integration points.

+--------------+
----+ Maximization +-----------------------------------------------------

*maximize_options*: __dif__**ficult**, __tech__**nique(***algorithm_spec***)**, __iter__**ate(***#***)**,
[__no__]__lo__**g**, __tr__**ace**, __grad__**ient**, **showstep**, __hess__**ian**, __showtol__**erance**,
__tol__**erance(***#***)**, __ltol__**erance(***#***)**, __nrtol__**erance(***#***)**, __nonrtol__**erance**, and
**from(***init_specs***)**; see **[R] maximize**. Those that require special
mention for **irt** are listed below.

**from()** accepts a properly labeled vector of initial values or a list
of coefficient names with values. A list of values is not allowed.

The following options are available with **irt** but are not shown in the
dialog box:

**startvalues()** specifies how starting values are to be computed. Starting
values specified in **from()** override the computed starting values.

**startvalues(zero)** specifies that all starting values be set to 0.
This option is typically useful only when specified with the
**from()** option.

**startvalues(constantonly)** builds on **startvalues(zero)** by fitting a
constant-only model for each response to obtain estimates of
intercept and cutpoint parameters.

**startvalues(fixedonly)** builds on **startvalues(constantonly)** by fitting
a full fixed-effects model for each response variable to obtain
estimates of coefficients along with intercept and cutpoint
parameters. You can also add suboption **iterate(***#***)** to limit the
number of iterations **irt** allows for fitting the fixed-effects
model.

**startvalues(ivloadings)** builds on **startvalues(fixedonly)** by using
instrumental-variable methods with the generalized residuals from
the fixed-effects models to compute starting values for
latent-variable loadings. This is the default behavior.

**noestimate** specifies that the model is not to be fit. Instead, starting
values are to be shown (as modified by the above options if
modifications were made), and they are to be shown using the
**coeflegend** style of output. An important use of this option is
before you have modified starting values at all; you can type the
following:

**. irt** ...**,** ... **noestimate**

**. matrix b = e(b)**

**.** ... (*modify elements of* **b**) ...

**. irt** ...**,** ... **from(b)**

**dnumerical** specifies that during optimization, the gradient vector and
Hessian matrix be computed using numerical techniques instead of
analytical formulas. By default, **irt** uses analytical formulas for
computing the gradient and Hessian for all integration methods.

**coeflegend**; see **[R] estimation options**.

__Examples__

Setup
**. webuse charity**

Fit an RSM
**. irt rsm ta1-ta5**

Use the RSM parameters to plot the category characteristic curves as a
function of theta for **ta1**
**. irtgraph icc ta1, xlabel(-4 -.993 1.05 2.18 4, grid)**

Use the RSM parameters to plot the category characteristic curves for the
first category of all items
**. irtgraph icc 0.ta***

__Video example__

Item response theory using Stata: Rating scale models (RSMs)

__Stored results__

**irt rsm** stores the following in **e()**:

Scalars
**e(N)** number of observations
**e(k)** number of parameters
**e(k_eq)** number of equations in **e(b)**
**e(k_dv)** number of dependent variables
**e(k_rc)** number of covariances
**e(k_rs)** number of variances
**e(irt_k_eq)** number of IRT model groups
**e(k_items1)** number of items in first IRT model group
**e(k_out***#***)** number of categories for the *#*th item, ordinal
**e(ll)** log likelihood
**e(N_clust)** number of clusters
**e(n_quad)** number of integration points
**e(rank)** rank of **e(V)**
**e(ic)** number of iterations
**e(rc)** return code
**e(converged)** **1** if target model converged, **0** otherwise

Macros
**e(cmd)** **gsem**
**e(cmd2)** **irt**
**e(cmdline)** command as typed
**e(model1)** **rsm**
**e(items1)** names of items in first IRT model group
**e(n_cuts1)** numlist of cuts in first IRT model group
**e(depvar)** names of all item variables
**e(wtype)** weight type
**e(wexp)** weight expression
**e(title)** title in estimation output
**e(clustvar)** name of cluster variable
**e(family***#***)** family for the *#*th *item*
**e(link***#***)** link for the *#*th *item*
**e(intmethod)** integration method
**e(vce)** *vcetype* specified in **vce()**
**e(vcetype)** title used to label Std. Err.
**e(opt)** type of optimization
**e(which)** **max** or **min**; whether optimizer is to perform
maximization or minimization
**e(method)** estimation method: **ml**
**e(ml_method)** type of **ml** method
**e(user)** name of likelihood-evaluator program
**e(technique)** maximization technique
**e(datasignature)** the checksum
**e(datasignaturevars)** variables used in calculation of checksum
**e(properties)** **b V**
**e(estat_cmd)** program used to implement **estat**
**e(predict)** program used to implement **predict**
**e(covariates)** list of covariates
**e(footnote)** program used to implement the footnote display

Matrices
**e(_N)** sample size for each item
**e(b)** coefficient vector, slope-intercept
parameterization
**e(b_pclass)** parameter class
**e(out***#***)** categories for the *#*th item, ordinal
**e(Cns)** constraints matrix
**e(ilog)** iteration log (up to 20 iterations)
**e(gradient)** gradient vector
**e(V)** variance-covariance matrix of the estimators
**e(V_modelbased)** model-based variance

Functions
**e(sample)** marks estimation sample