I am trying to generate new variable named, number of household in community who get credit with "NoHHCom_credit". The data set I have is survey data with 38 number of community in the country. In the data set, there is data about either the household get credit or not with variable name "hh_s14q01" and with 1=yes or 0=no, answers. the community dummy is represented by variable "saq07" and there is 38 communities.
The command I tried was
gen NoHHCom_credit = sum(hh_s14q01==1), if inrange(saq07==1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 ,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,3 2,33,34,35,36,52,53)
Please may you help me
Related Posts with command
How to see size of current data in Stata 16I just upgraded from Stata 15 to Stata 16 and very excited about it. However, I'm wondering why the …
Analyze a subset of a matched case control datasetI am using Stata 15.1 for Mac. My dataset after 1:4 case:control matching has 1168 cases (patients w…
VIF interpretationHi everyone, Using "vif" post command after running multiple regression, I got the following results…
Use stored correlation matrix from PWCORR in CORR2DATAHey Stata-listers, I will preface this by saying that I am not super familiar with matrices in Stat…
OLS or ProbitDear community, I conduct a research of how individual level and collective level economic indicator…
Subscribe to:
Post Comments (Atom)
0 Response to command
Post a Comment