This document introduces the difference and system generalized method-of-moments (GMM) estimators, which are widely used in panel data analysis. The article begins by explaining linear GMM, followed by a discussion of how the design of these estimators is driven by the characteristics of panel data, such as few time periods and many individuals, non-exogenous independent variables, fixed effects, and heteroskedasticity and autocorrelation within individuals. It then describes the Stata command `xtabond2`, which implements these estimators, and provides examples of its syntax. The article also explains how to perform the Arellano–Bond test for autocorrelation using the postestimation command `abar`. Finally, it offers tips for proper use of these estimators to prevent misuse and ensure accurate results.This document introduces the difference and system generalized method-of-moments (GMM) estimators, which are widely used in panel data analysis. The article begins by explaining linear GMM, followed by a discussion of how the design of these estimators is driven by the characteristics of panel data, such as few time periods and many individuals, non-exogenous independent variables, fixed effects, and heteroskedasticity and autocorrelation within individuals. It then describes the Stata command `xtabond2`, which implements these estimators, and provides examples of its syntax. The article also explains how to perform the Arellano–Bond test for autocorrelation using the postestimation command `abar`. Finally, it offers tips for proper use of these estimators to prevent misuse and ensure accurate results.