Author
Abstract
In models where the relationship between the outcome and the error term is linear, a residual can be computed by simply plugging in the estimated coeacients and computing the difference between observed and predicted values of the outcome variable. These residuals can then be used for many different purposes, for example: (a) evaluating assumptions of orthogonality of errors (like Rxed and random effects); (b) examining the entire shape of the error distribution; and (c) computation and inference on externalities such as network effects. However, this simple approach does not work when the model is nonlinear in outcomes and errors. Here different context-speciRc generalized residuals have been proposed, each having different properties for speciRc models. Note that for the canonical linear or nonlinear Gaussian regression model, the above construction is simply a scaled version of the partial derivative of the log-likelihood contribution of an individual observation with respect to the outcome variable. This suggests a general construction of generalized regression by perturbing the outcome variable and computing contrasts. This approach is closely related to Huber's inXuence function and can be routinely computed using Stata, for example, and also parallelized for large datasets. We propose this general construction of generalized residuals and evaluate its use in several contexts: (a) quantile regression and evaluation of conditional quantiles at the tails (for example, growth at risk); (b) computing errors distributions (for example, binary regression and random- effects models); and (c) computing network externalities in discrete choice and duration models. This delivers a uniRed approach with promising Rndings.
Suggested Citation
Tibor Szendrei & Arnab Bhattacharjee, 2025.
"A simple approach to compute generalized residuals for nonlinear models,"
UK Stata Conference 2025
17, Stata Users Group.
Handle:
RePEc:boc:lsug25:17
Download full text from publisher
Corrections
All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:boc:lsug25:17. See general information about how to correct material in RePEc.
If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.
We have no bibliographic references for this item. You can help adding them by using this form .
If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.
For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F Baum (email available below). General contact details of provider: https://edirc.repec.org/data/stataea.html .
Please note that corrections may take a couple of weeks to filter through
the various RePEc services.