Hello everyone,
Im having trouble findind the right command to do this, hope you can help me. I need to generate a variable that tells me how many characteristics have every person surveyed. All the characteristics are satisfied when all these variables are = 1:
poco_int==1 | index_depr==1 | no_dormir==1 | cansancio==1 |no_apetito==1 | atencion==1 | moverse==1
Also the ID of each person is the variable HHID
Im going to describe an example for you to understand me better: Is like the person #8 fulfill poco_int=1 and cansancio=1 so they have 2 characteristics satisfied and the variable generated is going to be 2 for this person
hope my english is okay! thank you so much
Related Posts with Generate variable counting with conditions
Normality of dependent variable in panel dataHi, I want to perform a panel data regression analysis. I have a dataset of 40 countries for 15 yea…
Interrupted time series and regression discontinuityHi, I have come across a user written command called ITSA (see https://www.stata-journal.com/articl…
Explanatory variable transformation in linear regressionHi, I am working with a database containing school applications of students during year 2019 (rank-o…
removing decimalsI want to remove the decimal places from age but without rounding. e.g. 75.6 to 75 (and not 76) .…
Error including hyphen in graph legend textThis seems to be a bug, but I am unable to include a hyphen (to indicate a numerical range) in a leg…
Subscribe to:
Post Comments (Atom)
0 Response to Generate variable counting with conditions
Post a Comment