Hi there.
I have about 24 variables named rptr_agcy_name1-rptr_agcy_name24. In each of these is the name of a reporter, you can see examples below. I want to create a variable, say, num_reports_total, that would count how many times a reporter shows up across ALL 24 variables and across ALL observations. For instance, Center for Youth would have a num_reports_total=3. One issue is that I have tons of different reporter names so I can't really generate this by hand using the names themselves. Any ideas? TIA.
I have about 24 variables named rptr_agcy_name1-rptr_agcy_name24. In each of these is the name of a reporter, you can see examples below. I want to create a variable, say, num_reports_total, that would count how many times a reporter shows up across ALL 24 variables and across ALL observations. For instance, Center for Youth would have a num_reports_total=3. One issue is that I have tons of different reporter names so I can't really generate this by hand using the names themselves. Any ideas? TIA.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str64(rptr_agcy_name1 rptr_agcy_name2 rptr_agcy_name3) "" "" "" "" "" "" "" "" "" "" "" "" "" "Ohio Township Police Allegheny County" "Crisis Center North" "" "" "" "Center for Youth" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "Center for Youth" "" "" "" "Center for Youth" "" "" "" "" "" "Westmoreland County Juvenile Probation" "Kids Plus Pediatrics" "" "" "" "" "" "" "" "Comprehensive Lung Center" "Elk Co Cyf" "" "" "" end
Comment