0
$\begingroup$

I have some questions about how to define my regression.

So, I want to use fixed effect model in order to estimate the effect of trade openness on gini coefficient. I include 58 countries including developed and developing countries.

$Y_{it} = Z_i + B_{it} Trade + U_{it}$

However, I'm still confused whether to set the "i" as "country" or the category whether its "developed or developing" because I want to see the results for both developed and developing countries. If I set the "i" as the "country", does it mean that I have 58 intercepts in total?

(I'm using R by the way) Thanks a lot guys.

$\endgroup$
  • $\begingroup$ Do you have multiple years of data for each country, or only one? $\endgroup$ – Peter Flom Apr 22 at 11:20
  • $\begingroup$ Yes, I have multiple years,from 1980 - 2017 $\endgroup$ – zahrina adani Apr 22 at 11:43
0
$\begingroup$

Per your comment, you have multiple years for each country. You need to account for that. One way is with a multilevel model. Two such that might be good for you are a random intercept model and a random slopes and intercepts model.

These can be modeled as

$y = X\beta + Z\gamma + \epsilon$

where y is a $nx1$ vector of the dependent variable, X is an $nxp$ matrix of independent variables, $\beta$ and $\gamma$ are parameters to be estimated ($beta$ is for "fixed" effects and $\gamma$ for "random" effects) and $\epsilon$ is error.

You will need more than one independent variable - one for "trade" and one for "type of country". However, I would caution against categorizing countries into "developing" and "developed". It would be better to use some continuous measure of how developed a country is. Categorizing continuous IVs is a bad idea. In his book Regression Modeling Strategies Frank Harrell gives a list of reasons and concludes with "nothing could be more disastrous" (it's an excellent book). I recently wrote an article demonstrating, graphically, what happens when we categorize continuous variables.

There are at least two R packages for this sort of model: LME4 and NLME.

$\endgroup$
0
$\begingroup$

However, I'm still confused whether to set the "i" as "country" or the category whether its "developed or developing" because I want to see the results for both developed and developing countries.

Either model could be valid. If you think all developed and undeveloped countries should have the same base rate of inequality other than what is explained by your observable controls, you could use developed vs undeveloped. But I would probably go with country fixed effects because there are likely to be important unobservable country-specific features and with so many observations for each country you shouldn't have trouble estimating them well.

If I set the "i" as the "country", does it mean that I have 58 intercepts in total?

It means you have 57 intercepts total. If you had 58 you would run into the "dummy variable trap."

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.