In this article, we discuss the implementation of Andrews’s (1988a, Journal of Econometrics 37: 135–156; 1988b, Econometrica 56: 1419–1453) chi-squared goodness-of-fit test as a postestimation command. The new command chi2gof reports the test statistic, its degrees of freedom, and its p-value. chi2gof can be used after the poisson, nbreg, zip, and zinb commands.