In this paper, we describe how to test for the presence of measurement error in explanatory variables. First, we discuss the test of such hypotheses in parametric models such as linear regressions and then introduce a new Stata command [R] dgmtest for a nonparametric test proposed in Wilhelm (2018). To illustrate the new command, we provide Monte Carlo simulations and an empirical application to testing for measurement error in administrative earnings data.