I have a long shaped dataset of 200 countries. I would like to run functions, for example, "table" for other variables related to the countries (i.e.: income, population, etc.) but just for a subset of those countries that are ordered by country_id (for example, I would like to run the function only for the countries with id: 1, 2, 28, 78,150,180). My first idea was to put the countries_id of interest on a local macro to call it from a loop. However, I do not know which can of the loop be used for running a command like:
Code:
table income if country_id belongs to a subsect of observations in country_id
0 Response to Running a function for a subset of observations
Post a Comment