# Simulated Maximum likelihood estimation

How to estimate the parameters of the variable from which we make draws in MSLE. For example, Consider (example from Cameron and Trivedi-12.4.5 Unobserved heterogeneity) $$y_i=\theta +u_i+\epsilon$$

I am interested in getting value of theta to get that I use MSLE. For using MSLE we make draws from u but how do I approach the problem if I don't know the parameters of u.

Meaning if I know the distribution of u but it has unknown parameter how do I get theta and parameters of u?

Lets say you think $u_i$ is normally distributed with mean 0 and an unknown standard deviation $\sigma$. Now you have two parameters in your likelihood function and you maximize both. You start with starting values. Now you draw your sample of $u_i$ given that starting value. The next iteration you will get improved guesses of these parameters, and use those for drawing your $u_i$. You continue iterating till convergence.