Hi all,

I am a beginner when it comes to MLE estimation using STATA.
Suppose my observations are Xi. The parameter is p.
The Log likelihood function is in the image attached.


Here, p vector is composed of three different probabilities. p1, p2 and p3. Xi is an indicator variable composed of three different indicators 1, 2 3.

I referred to this guide here - https://www.stata.com/features/overv...od-estimation/

The question is how to write the program for my question using the given likelihood function and what to put in the ml command?

Thanks.