The WALS approach for linear models with nonspherical errors employs a feasible generalized least squares (FGLS) strategy that mimics the case in which only the error variance must be estimated. We first estimate the parameters of the variance matrix from the unrestricted model, and then apply WALS to an FGLS transformation of the original data. Our Stata commands implement two special cases of this general framework: hetwals fits linear models with multiplicative forms of heteroskedasticity, and ar1wals fits linear models with AR(1) errors.
The WALS approach can be applied to both fixed-effects and random-effects panel data models with strictly exogenous regressors. In the fixed-effects model, the individual effects are treated as additional (nuisance) focus parameters, so the fixed-effects WALS estimator is obtained by applying WALS to the usual within-transformed data. In the random-effects model, WALS is applied to an FGLS-transformed version of the data to account for the stable equicorrelation structure that characterizes the one-way errors within units over time. In both cases, the idiosyncratic regression errors are allowed to be either iid or AR(1). For further details, see the Stata command xtwals.
The WALS approach to generalized linear models (GLMs) covers a variety of nonlinear models for discrete and categorical outcomes, including logit, probit, and Poisson regressions. This extension relies on a linearization of the likelihood equations, as in the Newton–Raphson and Fisher scoring algorithms. Unlike the classical iteratively reweighted least squares (IRLS) procedure, WALS is applied to the data transformations obtained in the first iteration. To reduce the estimator’s sensitivity to the choice of starting values, we also consider an iterative procedure that repeatedly updates the initial values using the one-step WALS estimates from the previous iteration until a convergence criterion is satisfied. For further details, see the Stata command glmwals.