Maximum Likelihood Estimation for Gene-by-Measured Environment