Hi, I want to create a loop command to generate quotients (number of cases divided by number at risk) for multiple variables ending in "cases" and "at_risk". If I only had one set of variables, I would use:
However, the data will be continuously updated with many more countries so an automated method is preferable. Is it possible to create a loop command that essentially does the following?
Thanks in advance!
Code:
gen quotient_countryA= countryA_cases / countryA_at_risk
Code:
gen quotient_country*= *country_cases / *country_at_risk
Thanks in advance!
Comment