Dear all,
I am working on a dataset where households own different assets and I want to generate a new dummy variable (adownership) that reflects whether their "ownership score" is adequate or not. For this purpose, I am using 6 other dummy variables (whether they own a radio, a phone...).
For my new dummy to be adequate (that is to say =1), I want at least 4 out of 6 dummy variables to be positive. This can be any combination of the 6 dummy variables (that I called adradio, adphone, adspray, adkra, adsto, adchi). My initial idea was to generate a new variable that would take the value 1 by listing all the possible combinations but I believe this is quite tedious and prone to errors.
Does anyone have a better solution on how to proceed?
Thank you very much in advance!
Related Posts with Creating a new dummy if at least 2/3 of some other dummies are positive
working with household survey dataI have a data-set which was captured for different houshold within a community it has 40,923 members…
Chi-square test for equality of regression coefficients with panel dataHello, I am using panel data, with firm data where I analyze 13 determinants of ownership by invest…
DiD - sample attrition, what if I impute missing data?Hello, I am estimating a treatment using differences-in-differences. The subjects in my treatment s…
how to display frequencies and percentages to whole numbers only in STATA SE/15.1Hi, 'm working with a data set of 58 variables and 795 observations. Most of the variables are categ…
Panel spatialHello I'm interesting to road a panel spatial with n=399 and t=12. In the stata 15 I use to do that…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a new dummy if at least 2/3 of some other dummies are positive
Post a Comment