Dear Statalist,

I have currently created four variables about family status: 1) Parents living together 2) Shared custody 3) Lonley parent 4) Living with a step parent/new family. They act as four dummys where 0 = different status 1 = actual status. My challenge is to combine these together.

Talking to my advisor she told me it would be more wise to group them together and use one of them as a reference category. I assume the best way to do this is to run the final, combined categorical variable as a factor variable and write b1.familystatus in the regression.After much googling and Statalisting I do not manage to find exactly what I look for.

So far I have tried the egen group-function (egen newvar = group (var1 var2 var3 var4)) but this gives me more categories than expected/a combination of the combinations I guess.

Has anyone come across this dilemma before?


Thanks a lot in advance.


Best regards,
Jonas.



If it was unclear: I have 4 pie charts where each just show 0 or 1 (50,50 split), while I want a more nuanced pie chart with all the combinations (25% split).