Changed the code so that it stops when more than 20% of the models failed to produce the covar matrix: non invertible hessian

Basically added a few lines of code so that the model takes the average without the NAs (these are for the non invertible hessian cases).
But doesn't go further if we have >20% of NAs in our simulation.