Hi..
I have a loop that works fine. The loop runs over several countries. Since the estimation results are displayed one by one country, it is difficult to know which set of results belongs to which country. So, I want to add a line that will display the country name.
The code is the following:
The local used in the above code is not working properly. It displays the first country's name (in my dataset) for all countries. There's is a 1:1 correspondence between the country name and id.
Kindly help.
I have a loop that works fine. The loop runs over several countries. Since the estimation results are displayed one by one country, it is difficult to know which set of results belongs to which country. So, I want to add a line that will display the country name.
The code is the following:
Code:
foreach i of numlist 1/100 { di "id=`i'" local country_name = country[1] di "country name = `country_name'" dfuller x, drift lags(3) regress, if id==`i' } *
Kindly help.
Comment