Dear statalisters
I'm facing with a lot of difficulties to implement matching with propensity scores with stat. I will be pleased to be help.

I have some data covering several countries about net income. I have several variables : the income will be the dependant variable and I have the size, the year and a dichotomous variable.
I would like to see if this dichotomous variable variable change something to a phenomenon. With non matching, it seems that this dichotomous variable variable has an impact on the phenomenon observed on the variable Income. I'd like to exclude the fact that all of this should be explain by another variable particularly the size.
So I want to do 2 sub-groups comparable in size. I think the matching technique with propensity score is suitable.
I have several questions about it :
- I read that I need to sort randomly before matching, but how can i do that ?
- How can I do the matching taking care of the size in respecting the year. If I understand well Sebastian Geiger in this post : https://www.statalist.org/forums/for...pensity-scores, I need to do a loop ? But how ?
- At the end, when the option of the matching fits well with the data, how can I get the data of the generated subgroups ? I need it to further my research about the phenomenon studied on Income in this new two subgroups.
Thank you in advance for your help for the code in stata to do this.