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
Can I use logit without with YES/NO data instead of 0/1?Hi, everyone, All my data are in YES/NO values instead of 0/1. And I want to find the correlation a…
Sublime Text and Stata 16I am trying to use Sublime Text with Stata 16, similar to what I previously did with earlier version…
How to check correlation among 2000+ variables in a quick way?Hi, all, I had a data set of 2000+ variables (all binary or categorical), for example, 1000+ are …
Plotting a (curvilinear) mediated relationI am working with a mediated-moderated model like that in Fig. 1. All variables in the model are con…
Construct equally weighted decile portfolios by ranking stocks on past 3 years volatilityHey dear Members, I have a data sets of about 303 companies with monthly returns of the last 22 yea…
Subscribe to:
Post Comments (Atom)
0 Response to Generate variable counting with conditions
Post a Comment