betaFeedback

WorksMathematics

An efficient stochastic generalized method of moments estimator for nonlinear moment models

Abstract

We study the asymptotic properties of the nonlinear stochastic GMM algorithm proposed by Chen, Lee, Liao, Seo, Shin and Song for recursively estimating parameters defined by possibly nonlinear and overidentified moment restrictions \E[g(X,β^*)]=0. Each observation updates estimates of the moment Jacobian, inverse covariance matrix and Gauss–Newton preconditioner at a cost independent of sample size. For linear and nonlinear instrumental-variable moments, we derive an exact rank-two Sherman–Morrison–Woodbury update. The algorithm combines preconditioned stochastic approximation with iterate averaging. Under a preconditioned monotonicity condition, satisfied globally in linear models and locally around a consistent pilot estimate in general, we establish almost sure convergence and rates, as well as a functional central limit theorem with the efficient GMM variance. These results require four moments of the moment function and its Jacobian when the step exponent exceeds 2/32/3. The inverse Gauss–Newton matrix consistently estimates this variance, and a projected linearised statistic enables online testing of overidentifying restrictions. We extend the results to LL-dependent data with long-run variance weights under stronger moment assumptions. Simulations show that the averaged estimator approaches offline two-step GMM in accuracy and coverage at 10610^6 observations, while requiring a fraction of its computing time and fixed memory at up to 10710^7 observations. The online test achieves correct size and comparable power. In an application estimating the effect of a third child on weeks worked using 254,654254{,}654 women from the 1980 US Census, single-pass estimates agree with offline GMM within a fraction of a standard error on average across data orderings, and both methods yield the same overidentification-test conclusion in most orderings.

Introduction

The generalized method of moments (GMM) of Hansen [12] estimates a parameter β∗∈Rdβ\beta^* \in\mathbb{R}^{d_\beta} from moment restrictions

E[g(X,β∗)]=0,g:X×Rdβ→Rdg,dg≥dβ,(1)\mathbb{E}\left[g(X,\beta^*)\right] = 0,\qquad g:\mathcal{X}\times\mathbb{R}^{d_\beta}\to\mathbb{R}^{d_g},\qquad d_g\ge d_\beta, \tag*{(1)}

without specifying the distribution of the data XX. It is a basic tool in econometrics and statistics: instrumental-variable (IV) regression, Euler equations of consumption-based asset pricing models [13], models with endogenous regressors and count data [22, 32] and moment-based estimation of stochastic volatility models [2] are all of the form (1). The efficient two-step GMM estimator minimises gˉn(β)⊤Wngˉn(β)\bar{g}_n(\beta)^\top W_n\bar{g}_n(\beta), where gˉn\bar{g}_n is the sample average of the moments and WnW_n estimates the inverse of their covariance matrix [12, 14, 23]. For nonlinear moments this requires an iterative optimization in which every iteration passes over the whole sample, and the whole sample must be kept in memory. With very large or streaming data sets, this is the bottleneck.

Chen et al. [8] proposed a stochastic approximation alternative, called SGMM, which processes the observations one at a time. For linear IV models they established almost sure convergence of the online two-stage least squares (2SLS) estimator, asymptotic normality and functional central limit theorems for online 2SLS and for the efficient SGMM, and online versions of the Durbin–Wu–Hausman and Hansen–Sargan tests. They also described a nonlinear version of SGMM, in which the Jacobian and the weight matrix are updated at the averaged iterate, but left its asymptotic properties to future research. The purpose of this paper is to provide this theory.

We consider the nonlinear SGMM of Chen et al. [8], with a step-size offset added for numerical stability, and a projection onto a compact set and a truncation of the preconditioner added for the analysis (§ 2). After an initialization on a small pilot sample, the iith observation XiX_i updates the running average Φi\Phi_i of the Jacobians ∂βg(Xj,βˉj−1)\partial_\beta g(X_j,\bar{\beta}_{j-1}), the inverse WiW_i of the running average of g(Xj,βˉj−1)g(Xj,βˉj−1)⊤g(X_j,\bar{\beta}_{j-1})g(X_j,\bar{\beta}_{j-1})^\top by a Sherman–Morrison formula, and the inverse Hi=(Φi⊤WiΦi)−1H_i=(\Phi_i^\top W_i\Phi_i)^{-1} of the Gauss–Newton matrix; the parameter is updated by

βi=βi−1−γiHi−1Φi−1⊤Wi−1g(Xi,βi−1),\beta_i=\beta_{i-1}-\gamma_iH_{i-1}\Phi_{i-1}^\top W_{i-1}g(X_i,\beta_{i-1}),

and the estimator is the average βˉn\bar{\beta}_n of the iterates [26, 30]. The step Hi−1Φi−1⊤Wi−1gH_{i-1}\Phi_{i-1}^\top W_{i-1}g is a stochastic Gauss–Newton step for the GMM objective, in the spirit of the stochastic Newton and Gauss–Newton algorithms of Bercu et al. [4] and Cénac et al. [7], here driven by an estimating equation rather than by the gradient of a loss.

Our paper makes the following contributions to the literature.

  1. Recursive inversion. For moment functions of IV type, g(x,β)=z r(x,β)g(x,\beta)=z\,r(x,\beta) with instruments zz and a scalar residual rr, the Jacobian has rank one and the efficient weight is updated with a multiple of zz; we show that HiH_i is then obtained from Hi−1H_{i-1} by an exact rank-two Woodbury update, which costs O(dg2+dgdβ+dβ2)O(d_g^2+d_gd_\beta+d_\beta^2) operations per observation (Lemma 3.2). It contains the formula of Chen et al. [8] for linear 2SLS, for which we give a complete proof.

(2) Almost sure convergence in the nonlinear case. Under a preconditioned monotonicity condition (Assumption A3), which holds globally for linear models and on every sufficiently small neighbourhood of β∗\beta^{*} for smooth nonlinear models (Proposition 4.1), the iterates and their average converge almost surely, with a continuously updated weight matrix (Theorem 4.3). With the parameter set chosen as a ball around a pilot estimate, convergence holds with probability tending to one as the pilot sample grows, without knowledge of β∗\beta^{*} (Corollary 4.2).

(3) Rates and functional central limit theorem under four moments. We give almost sure rates for the iterates (Theorem 4.4) and a functional central limit theorem for the partial sums of the iterates, with the efficient GMM variance (GTΩ−1G)−1(G^{\mathsf{T}}\Omega^{-1}G)^{-1} (Theorem 4.5). A blocking argument keeps the moment condition at four moments of the moment function and its Jacobian for step exponents a>2/3a > 2/3.

(4) Online inference. The recursively updated matrix HnH_n converges almost surely to the asymptotic variance, so plug-in confidence intervals cost nothing extra; random-scaling intervals [19] are also justified (Corollary 4.7). A projected, linearised and recursively computable version of the Hansen–Sargan statistic has the usual χdg−dβ2\chi^{2}_{d_g-d_\beta} limit (Theorem 4.8); the projection makes it insensitive to the distance between the averaged iterate and the minimiser of the GMM criterion.

(5) Dependent data. For LL-dependent data, the same parameter step with long-run variance weights retains the convergence, rate, central limit and inference results with the efficient GMM variance for dependent data, under a stronger moment condition (more than eight moments for a=3/4a = 3/4; Theorem 5.1).

(6) Evidence. Simulations for linear and exponential IV models with 1000 replications and up to 10610^{6} observations; size and power of the online test; invariance to the units of measurement; timings of a compiled implementation up to 10710^{7} observations; a stochastic volatility model with dependent data (§ 6); and an empirical application with 254,654 observations (§ 7).

Relation to Chen et al. [8] and Leung et al. [21]. The two papers closest to ours are these. Chen et al. [8] introduced SGMM and developed its theory for linear IV models with i.i.d. data: almost sure convergence of online 2SLS, functional central limit theorems for online 2SLS and for efficient SGMM, plug-in and random-scaling inference, and online Durbin–Wu–Hausman and Hansen–Sargan tests. Their Section 7 proposes the nonlinear algorithm studied here and leaves its asymptotic properties open. Relative to that paper, our contributions are as follows.

  • Asymptotic theory for nonlinear SGMM. We prove convergence, rates, a functional central limit theorem with the efficient variance, and inference for nonlinear SGMM. The Jacobian and the weight matrix are re-estimated at the averaged iterate, so the preconditioner depends on the whole path. In the linear SGMM of Chen et al. [8], the Jacobian does not depend on the parameter and the weight is computed at a fixed preliminary estimate. Handling this dependence requires the preconditioned monotonicity condition and the local analysis of Proposition 4.1 and Corollary 4.2.

  • Rank-two update. We give a rank-two update of the Gauss–Newton matrix that covers nonlinear IV-type moments. For linear efficient SGMM, Chen et al. [8] use a rank-three update.

  • Variance estimate. We show that the inverse Gauss–Newton matrix HnH_n, which enters the preconditioner, is a strongly consistent variance estimator.

  • Projected overidentification statistic. We propose a projected overidentification statistic. It removes the contribution of the distance between the averaged iterate and the minimiser of the GMM criterion, which can dominate the unprojected statistic in finite samples (§ 7).

Leung et al. [21] study online GMM for stationary time series. Their estimator is updated explicitly batch by batch: nonlinear moments are handled by expanding the sample moments around estimates from earlier batches, and the weight matrix is an online long-run variance estimator. They establish efficiency under serial dependence and propose online Hansen–Sargan and structural stability tests. They also point out two weaknesses of SGMM in its original form: sensitivity to the initial learning rate, and size distortion of its online Hansen–Sargan test in finite samples. Our paper differs from theirs in three ways.

  • Type of algorithm. Our algorithm is a stochastic approximation that updates the parameter with every observation, and our dependent-data result (Theorem 5.1) shows that this recursion keeps its efficiency with long-run variance weights. Our dependence assumption, LL-dependence, is much more restrictive than theirs.

  • Learning rate. The Gauss–Newton preconditioner makes the parameter step invariant to invertible linear reparametrizations of the parameter and of the moments, apart from the effect of the ridge and the projection (Remark 3.1(v)). Our default step rule then works without tuning across our examples, whereas a first-order version fails after a change of units (§ 6.4).

  • Overidentification test. Our projected online statistic has close to nominal size in our simulations (§ 6.3).

A direct numerical comparison with their estimator is left for future work.

Related literature. Stochastic approximation goes back to Robbins and Monro [27]; averaging of the iterates was introduced by Ruppert [30] and Polyak and Juditsky [26], and almost sure analyses are given by Duflo [9], Pelletier [25] and Kushner and Yin [18]. Stochastic Newton-type algorithms with recursively inverted Hessian estimates were developed for logistic regression [4] and nonlinear regression [7], and the use of Sherman–Morrison updates to avoid matrix inversions is also central to the natural-gradient variational Bayes method of Godichon-Baggioni et al. [10]. Online inference based on the functional central limit theorem was proposed by Lee et al. [19]. All of these concern the minimization of an expected loss; GMM with overidentification is different, because the estimating function is a fixed linear combination of the moments with an unknown optimal weight, and the weight matrix and the Jacobian must be learned together with the parameter.

The rest of this paper is organized as follows: § 1.1 introduces the model and examples. § 2 presents the algorithm and the recursive inversion formulas. § 3 states the asymptotic results for independent data and § 4 the extension to dependent data; the proofs are in § 5. § 6 reports simulations, § 7 the empirical application, and § 8 concludes.

Notation. ∥x∥\lVert x\rVert is the Euclidean norm of a vector and ∥A∥\lVert A\rVert the operator norm of a matrix; λmin⁡(A)\lambda_{\min}(A), λmax⁡(A)\lambda_{\max}(A) are the extreme eigenvalues of a symmetric matrix and σmin⁡(A)\sigma_{\min}(A) the smallest singular value; A⪯BA \preceq B means that B−AB-A is positive semi-definite; IdI_d is the d×dd \times d identity. For a closed set SS of matrices, dist⁡(A,S)=min⁡B∈S∥A−B∥\operatorname{dist}(A,S) = \min_{B\in S}\lVert A-B\rVert. Convergence in distribution is denoted by ⇒\Rightarrow.

Model and examples

Let X,X1,X2,…X,X_1,X_2,\ldots be independent and identically distributed random elements of a measurable space X\mathcal{X} and Θ⊂Rdβ\Theta\subset\mathbb{R}^{d_\beta}. For x∈Xx \in\mathcal{X} and β∈Θ\beta\in\Theta let g(x,β)∈Rdgg(x,\beta) \in\mathbb{R}^{d_g} be the moment function and G(x,β)=∂g(x,β)/∂βT∈Rdg×dβG(x,\beta) = \partial g(x,\beta)/\partial\beta^\mathsf{T} \in\mathbb{R}^{d_g \times d_\beta} its Jacobian. Write

m(β)=E[g(X,β)],G‾(β)=E[G(X,β)],Ω(β)=E[g(X,β)g(X,β)T],m(\beta) = \mathbb{E}[g(X,\beta)], \qquad\overline{G}(\beta) = \mathbb{E}[G(X,\beta)], \qquad\Omega(\beta) = \mathbb{E}[g(X,\beta)g(X,\beta)^\mathsf{T}],

and G∗=G‾(β∗)G^* = \overline{G}(\beta^*), Ω∗=Ω(β∗)\Omega^* = \Omega(\beta^*). The parameter β∗\beta^* is the unique zero of mm in Θ\Theta. For a positive definite weight matrix WW, the GMM estimator minimises g‾n(β)TWg‾n(β)\overline{g}_n(\beta)^\mathsf{T}W\overline{g}_n(\beta) with g‾n(β)=n−1∑i=1ng(Xi,β)\overline{g}_n(\beta) = n^{-1}\sum_{i=1}^n g(X_i,\beta), and under standard conditions [12, 23]

n(β^n−β∗)⇒N(0,ΣW),ΣW=(G∗TWG∗)−1G∗TWΩ∗WG∗(G∗TWG∗)−1.(2)\sqrt{n}(\widehat{\beta}_n-\beta^*) \Rightarrow N(0,\Sigma_W), \qquad\Sigma_W = (G^{*\mathsf{T}}WG^*)^{-1}G^{*\mathsf{T}}W\Omega^*WG^*(G^{*\mathsf{T}}WG^*)^{-1}. \tag*{(2)}

The variance is minimal for W∝Ω∗−1W \propto\Omega^{*-1}, where it equals Σ∗=(G∗TΩ∗−1G∗)−1\Sigma^* = (G^{*\mathsf{T}}\Omega^{*-1}G^*)^{-1}; the two-step estimator achieves it with a preliminary consistent estimate of Ω∗\Omega^*.

Example 2.1 (Linear IV regression). Let X=(y,x,z)X=(y,x,z) with y=xTβ∗+uy=x^{\mathsf{T}}\beta^*+u, E[zu]=0\mathbb{E}[zu]=0, where some components of x∈Rdβx\in\mathbb{R}^{d_\beta} are correlated with uu and z∈Rdgz\in\mathbb{R}^{d_g} is a vector of instruments. Then g(X,β)=z(xTβ−y)g(X,\beta)=z(x^{\mathsf{T}}\beta-y), G(X,β)=zxTG(X,\beta)=zx^{\mathsf{T}} does not depend on β\beta, and Gˉ=E[zxT]\bar{G}=\mathbb{E}[zx^{\mathsf{T}}] has full column rank under the usual relevance condition. With W=E[zzT]−1W=\mathbb{E}[zz^{\mathsf{T}}]^{-1}, (2) is the asymptotic variance of 2SLS; under heteroskedasticity the efficient GMM estimator is in general more efficient.

Example 2.2 (Nonlinear IV regression). More generally let g(X,β)=zr(X,β)g(X,\beta)=zr(X,\beta) for a scalar residual rr. Examples are the additive model y=f(x,β∗)+uy=f(x,\beta^*)+u with E[zu]=0\mathbb{E}[zu]=0, where r=f(x,β)−yr=f(x,\beta)-y, and the multiplicative exponential model for non-negative or count outcomes, y=exp⁡(xTβ∗)ηy=\exp(x^{\mathsf{T}}\beta^*)\eta with E[η∣z]=1\mathbb{E}[\eta\mid z]=1 [22, 32], where

References

  1. [1]K. M. Abadir and P. Paruolo, Two mixed normal densities from cointegration analysis, Econometrica 65(3) (1997), 671–680.DOI
  2. [2]T. G. Andersen and B. E. Sørensen, GMM estimation of a stochastic volatility model: a Monte Carlo study, Journal of Business & Economic Statistics 14(3) (1996), 328–352.
  3. [3]J. D. Angrist and W. N. Evans, Children and their parents’ labor supply: evidence from exogenous variation in family size, American Economic Review 88(3) (1998), 450–477.
  4. [4]B. Bercu, A. Godichon and B. Portier, An efficient stochastic Newton algorithm for parameter estimation in logistic regressions, SIAM Journal on Control and Optimization 58(1) (2020), 348–367.arxiv.org/abs/1904.07908
  5. [5]P. Billingsley, Convergence of Probability Measures, 2nd ed., Wiley, New York, 1999.
  6. [6]B. M. Brown, Martingale central limit theorems, Annals of Mathematical Statistics 42(1) (1971), 59–66.DOI
  7. [7]P. Cénac, A. Godichon-Baggioni and B. Portier, An efficient averaged stochastic Gauss–Newton algorithm for estimating parameters of non linear regressions models, Bernoulli 31(1) (2025), doi:10.3150/23-BEJ1637.DOI
  8. [8]X. Chen, S. Lee, Y. Liao, M. H. Seo, Y. Shin and M. Song, SGMM: stochastic approximation to generalized method of moments, Journal of Financial Econometrics 23(1) (2025), nbad027.
  9. [9]M. Duflo, Random Iterative Models, Applications of Mathematics 34, Springer, Berlin, 1997.
  10. [10]A. Godichon-Baggioni, D. Nguyen and M.-N. Tran, Natural gradient variational Bayes without Fisher matrix analytic calculation and its inversion, Journal of the American Statistical Association 120(550) (2025), 990–1001.
  11. [11]P. Hall and C. C. Heyde, Martingale Limit Theory and Its Application, Academic Press, New York, 1980.
  12. [12]L. P. Hansen, Large sample properties of generalized method of moments estimators, Econometrica 50(4) (1982), 1029–1054.DOI
  13. [13]L. P. Hansen and K. J. Singleton, Generalized instrumental variables estimation of nonlinear rational expectations models, Econometrica 50(5) (1982), 1269–1286.
  14. [14]F. Hayashi, Econometrics, Princeton University Press, Princeton, 2000.
  15. [15]E. Jacquier, N. G. Polson and P. E. Rossi, Bayesian analysis of stochastic volatility models, Journal of Business & Economic Statistics 12(4) (1994), 371–389.
  16. [16]N. M. Kiefer, T. J. Vogelsang and H. Bunzel, Simple robust testing of regression hypotheses, Econometrica 68(3) (2000), 695–714.DOI
  17. [17]C. Kleiber and A. Zeileis, Applied Econometrics with R, Springer, New York, 2008.DOI
  18. [18]H. J. Kushner and G. G. Yin, Stochastic Approximation and Recursive Algorithms and Applications, 2nd ed., Springer, New York, 2003.
  19. [19]S. Lee, Y. Liao, M. H. Seo and Y. Shin, Fast and robust online inference with stochastic gradient descent via random scaling, Proceedings of the AAAI Conference on Artificial Intelligence 36(7) (2022), 7381–7389.
  20. [20]E. Lenglart, Relation de domination entre deux processus, Annales de l’Institut Henri Poincaré, Section B 13(2) (1977), 171–179.
  21. [21]M. F. Leung, K. W. Chan and X. Shao, Online generalized method of moments for time series, arXiv:2502.00751, 2025.arxiv.org/abs/2502.00751
  22. [22]J. Mullahy, Instrumental-variable estimation of count data models: applications to models of cigarette smoking behavior, Review of Economics and Statistics 79(4) (1997), 586–593.DOI
  23. [23]W. K. Newey and D. L. McFadden, Large sample estimation and hypothesis testing, in Handbook of Econometrics, Vol. 4, R. F. Engle and D. L. McFadden (eds.), Elsevier, Amsterdam, 1994, 2111–2245.
  24. [24]W. K. Newey and K. D. West, A simple, positive semi-definite, heteroskedasticity and autocorrelation consistent covariance matrix, Econometrica 55(3) (1987), 703–708.DOI
  25. [25]M. Pelletier, On the almost sure asymptotic behaviour of stochastic algorithms, Stochastic Processes and their Applications 78(2) (1998), 217–244.DOI
  26. [26]B. T. Polyak and A. B. Juditsky, Acceleration of stochastic approximation by averaging, SIAM Journal on Control and Optimization 30(4) (1992), 838–855.DOI
  27. [27]H. Robbins and S. Monro, A stochastic approximation method, Annals of Mathematical Statistics 22(3) (1951), 400–407.
  28. [28]H. Robbins and D. Siegmund, A convergence theorem for non negative almost supermartingales and some applications, in Optimizing Methods in Statistics, J. S. Rustagi (ed.), Academic Press, New York, 1971, 233–257.
  29. [29]M. R. Rosenzweig and K. I. Wolpin, Natural “natural experiments” in economics, Journal of Economic Literature 38(4) (2000), 827–874.DOI
  30. [30]D. Ruppert, Efficient estimations from a slowly convergent Robbins–Monro process, Technical Report 781, School of Operations Research and Industrial Engineering, Cornell University, 1988.
  31. [31]S. J. Taylor, Modelling Financial Time Series, 2nd ed., World Scientific, Singapore, 2008.
  32. [32]F. A. G. Windmeijer and J. M. C. Santos Silva, Endogeneity in count data models: an application to demand for health care, Journal of Applied Econometrics 12(3) (1997), 281–294.

Paper details

vlnc:W_sw6r8j4d
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents