**[XT] quadchk** -- Check sensitivity of quadrature approximation

__Syntax__

**quadchk** [*#1 #2*] [**,** __noout__**put** **nofrom** ]

*#1* and *#2* specify the number of quadrature points to use in the
comparison runs of the previous model. The default is to use
approximately 2*n_q*/3 and 4*n_q*/3 points, where *n_q* is the number of
quadrature points used in the original estimation.

__Menu__

**Statistics > Longitudinal/panel data > Setup and utilities >** **Check**
**sensitivity of quadrature approximation**

__Description__

**quadchk** checks the quadrature approximation used in the random-effects
estimators of the following commands:

**xtcloglog**
**xtintreg**
**xtlogit**
**xtologit**
**xtoprobit**
**xtpoisson****, re** with the **normal** option
**xtprobit**
**xtstreg**
**xttobit**

**quadchk** refits the model for different numbers of quadrature points and
then compares the different solutions. **quadchk** respects all options
supplied to the original model except **or**, **vce()**, and the
*maximize_options*.

__Options__

**nooutput** suppresses the iteration log and output of the refitted models.

**nofrom** forces refitted models to start from scratch rather than starting
from the previous estimation results. Specifying the **nofrom** option
can level the playing field in testing estimation results.

__Remarks__

As a rule of thumb, if the coefficients do not change by more than a
relative difference of 10^-4 (0.01%), the choice of quadrature points
does not significantly affect the outcome, and the results may be
confidently interpreted. However, if the results do change appreciably
-- greater than a relative difference of 10^-2 (1%) -- then you should
question whether the model can be reliably fit using the chosen
quadrature method and the number of integration points.

Two aspects of random-effects models have the potential to make the
quadrature approximation inaccurate: large group sizes and large
correlations within groups. These factors can also work in tandem,
decreasing or increasing the reliability of the quadrature. Increasing
the number of integration points increases the accuracy of the quadrature
approximation.

__Examples__

Setup
**. webuse quad1**
**. xtset id**

Fit random-effects (RE) probit model
**. xtprobit z x1-x6**

Check stability of quadrature calculation
**. quadchk**

Fit RE probit model using nonadaptive Gauss-Hermite quadrature
**. xtprobit z x1-x6, intmethod(ghermite)**

Check stability of quadrature approximation, suppressing output of models
**. quadchk, nooutput**

Same as above **xtprobit**, but increase the number of iteration points to
120
**. xtprobit z x1-x6, intmethod(ghermite) intpoints(120)**

Check stability of quadrature approximation, suppressing output of models
**. quadchk, nooutput**