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).
Related Posts with Combining a newly constructed dummy variables to one categorical variable for analysis/refcat
Merge V-Dem with UCDPHi! I am currently working on my bachelors-thesis, where I will measure the impact of voilent confl…
Adjusting the DSS Stata 'Prediction of normal returns formula'Dear Statalists, in order to be able to calculate non-parametric significance tests when doing an e…
xtlsdvc and xtbcfeHello, I am trying to fit a dynamic model determinants of corporate cash holdings for ~1700 firms a…
Relative risk from nlcom different from regression outputHi, I have a similar question to one posed a few years ago in this thread. I am running an adjusted…
time series: perform the same regression with different variablesHello everyone I have timeseries data containing the returns of an index and the returns of differe…
Subscribe to:
Post Comments (Atom)
0 Response to Combining a newly constructed dummy variables to one categorical variable for analysis/refcat
Post a Comment