Solved – Implementing Minimum distance estimation

estimationgeneralized-momentsstata

Let $\mu$ and $\sigma$ be two parameters of interest characterising a normal distribution. From a theoretical model, I know that these two parameters are related to each-other according to

$$\pi=\Phi\left(\frac{\Phi^{-1} (\alpha)-\mu}{\sigma}\right)$$

where $\Phi(\cdot)$ is the CDF of the standard normal and $\pi$ and $\alpha$ are random variables, for which I observe a number of realisations (let me note the empirical realisations $\hat{\pi}_i$ and $\hat{\alpha}_i$ for $i=1,2,..n$).

Based on this, I would like to estimate $\mu$ and $\sigma$ using minimum distance, namely
$$
\arg\min\limits_{\mu,\sigma}\sum^n_{i=1}\left( \hat{\pi}_i- \Phi\left(\frac{\Phi^{-1} (\hat{\alpha}_i)-\mu}{\sigma}\right)\right)^2 w_i
$$
for some vector of weights $\{w_1,w_2,..w_n\}$.

How do I implement that in STATA? If my understanding of the methods is correct, I believe I should be able to do this using the General Method of Moments. I tried using gmm in Stata, but it gave me an error message. Specifically, I tried

gmm (pi - normal((invnormal(alpha)-{mu})/{sigma})), instruments(pi alpha)

but received an error message saying
no non-missing values returned for equation 1 at initial values

Best Answer

You need to change the initial value of sigma. Default is zero, so you're dividing by zero and get missings at your initial values, as your error message indicates.

Related Question