Hi everyone,

I'm an undergraduate student studying economics and am having trouble with Stata. I'm doing some computations for a development economics course. I need to calculate the mean, min and max illiteracy rate and infant mortality rate in the 50 richest and poorest countries (based on GDP/capita) in the data set. I'm not sure how to approach this since I haven't done anything like this before. I mainly need help with the coding such that Stata will only look at the top 50 and bottom 50 countries. Someone suggested that I also create a dummy variable equal to 1 if GDP per capita is missing though I'm not sure how to incorporate this in the code.

The variables I presume I will need to use are the illiteracy rate, infant mortality rate and the GDP/capita variables.

Any help would be much appreciated. Thanks!