I ran the code below. It is a foreach loop where it runs a regression on a different subset of the data for each iteration. Each subset corresponds to the rows that have a unique value for the variable project_id. When the code runs it displays the results from each of the regressions it runs. I would like to know which regression result corresponds to which values of each proejct_id. Put differently, I would like to be able to see the specific code that is run for each iteration of the loop. How can I do this?
Code:
levelsof id, local(project_id)
foreach i in `project_id' {
reg vote_share treatment if id == `i' | treatment == 0
}

Comment