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
No observation error in areg using variables within a rangeHello there, have created three variables represing three classes (discrete) of travel times, naley…
Reshape command with quarterly dataI would like to reshape my data from wide to long format. My headers are dates every quarter so 31-1…
Very large t-statisticsDear all, I am performing cluster robust WLS and fixed effects models on a relatively small dataset…
Ommited because of collinearity even though 'collin' and 'vif' commands show no correlation.Dear all, I have a challenge that I cannot understand or deal with. When I run my regression I get a…
Problem in generating simple mean and graphDear all, It might be a silly a question but I've a simple problem in generating a mean variable. I…
Subscribe to:
Post Comments (Atom)
0 Response to command
Post a Comment