I have a panel of countries in long form for which I want to run regression by the country ID so I get coefficient specific to a country. so I have;
But I want now to take the coefficients and paste them back along their corresponding countries in a new variable so that I can then find which country has the highest beta.
say data looks like
How do I retrieve the betas in a new variable along the corresponding countries?
HTML Code:
local predictor year foreach p of local predictor { qui bysort id: regress lnpr `p' *outreg2 using regressions, excel }
say data looks like
HTML Code:
id year country lnpr 81 2000 Guinea 3.269569 81 2004 Guinea 3.113515 82 2000 congo 2.85647 82 2004 congo 3.238678 83 2000 mali 2.839078 83 2004 mali 3.206803 |
Comment