I am working on a research project in Economics and I need to simulate and estimate a n-person public good game with threshold. I have already written a theoretical model and I need to simulate it to generate a dataset to us for estimation. I have a basic knowledge of Matlab but writing the cose from scratch is still difficult for me. Knowledge of Maximum likelihood, optimization techniques and fmincon are required. Thank you!