  The generalized linear model is widely used in all areas of applied
statistics and while correct asymptotic inference can be achieved under
misspecification of the distributional assumptions, a correctly specified mean
structure is crucial to obtain interpretable results. Usually the linearity and
functional form of predictors are checked by inspecting various scatter plots
of the residuals, however, the subjective task of judging these can be
challenging. In this paper we present an implementation of model diagnostics
for the generalized linear model as well as structural equation models, based
on aggregates of the residuals where the asymptotic behavior under the null is
imitated by simulations. A procedure for checking the proportional hazard
assumption in the Cox regression is also implemented.
