Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about FE

    What I've written seems to have dissaperead.. I'm studying bilateral trade data (16 years) to find out if donor countries in difficult economic times prioritize those that that are becoming more close trading partners (in hoping they will become even closer to dampen the bad times). I have a variable (rel) which takes on the value 1 for the first recipient donor-pair (for all years), 2 for the second and so on.. then I wrote xtset rel year and then xtreg dependent variable independent variables, fe But somehow I get some effects which are not likely (wrong sign).. With RE I get the right sign but I dont have enough variables to use RE (time-independt variables).. Can anyone see if I'm doing something wrong with what I've just written? See the attached photo for the model. Thank you so much in advance!!!
    Last edited by robinb2; 07 May 2014, 16:05.

  • #2
    What I've written seems to have dissaperead.. I'm studying bilateral trade data (16 years) to find out if donor countries in difficult economic times prioritize those that that are becoming more close trading partners (in hoping they will become even closer to dampen the bad times). I have a variable (rel) which takes on the value 1 for the first recipient donor-pair (for all years), 2 for the second and so on.. then I wrote xtset rel year and then xtreg dependent variable independent variables, fe But somehow I get some effects which are not likely (wrong sign).. With RE I get the right sign but I dont have enough variables to use RE (time-independt variables).. Can anyone see if I'm doing something wrong with what I've just written? See the attached photo for the model. Thank you so much in advance!!!

    Comment


    • #3
      Hi Robin,
      As always, for future question, and respecting the protocol of the forum remember to sign with your real name. I believe if you send a mail using the contact us option can do the trick.
      Now in your model. You need to provide more information, or results regarding your problem. Based only in what you describe, The FE model is the preffered one over the RE (FE consistent and choose RE if its more efficient). To why the signs are unexpected, unless you provide some results, there is little that can be said to pinpoint if its a data, Stata or interpretation problem
      Hope this Helps.
      Fernando

      Comment


      • #4
        Hi Fernando, thank you!
        Fixed-effects (within) regression Number of obs = 58311
        Group variable: rel Number of groups = 3755

        R-sq: within = 0.0068 Obs per group: min = 1
        between = 0.0165 avg = 15.5
        overall = 0.0189 max = 18

        F(5,54551) = 74.43
        corr(u_i, Xb) = -0.3897 Prob > F = 0.0000

        ------------------------------------------------------------------------------
        lnaid | Coef. Std. Err. t P>|t| [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        lnexp | .0211253 .0017436 12.12 0.000 .0177077 .0245428
        realout | .0005076 .0021863 0.23 0.816 -.0037776 .0047928
        lngdpcap | .0778861 .0088206 8.83 0.000 .0605975 .0951746
        lnpop | .0601212 .0150976 3.98 0.000 .0305298 .0897125
        lnrexpgap | -.0000529 .0002244 -0.24 0.814 -.0004927 .0003869
        _cons | -.9877743 .222202 -4.45 0.000 -1.423292 -.5522568
        -------------+----------------------------------------------------------------
        sigma_u | .69357272
        sigma_e | .35849219
        rho | .78916481 (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(3754, 54551) = 41.87 Prob > F = 0.0000

        That is how the regression results looks like. I have roughly 70 000 rows of observations but some have some missing values.
        coefficients for lnpop and lngdpcap should be negative (as a recipient country grows it is in need of less aid, and smaller countries (with regard to population) are often prioritized with regards to aid).
        But here I see the opposite effect, and statistically significant!!.. The variables are in the same order as the picture of the model.
        I have compiled a dataset in excel, which I have made use of in stata. I am wondering whether it has something to do with having FE on recipient, donor or dyad? Now it is in on dyad, and I can not see how it can only be on recipient or donor as some values are tied to recipient, some to donor, some to both. Sadly my supervisor is on vacation and wont have time to answer before this project is due.


        Sincerely
        Robin

        Comment


        • #5
          I see.
          Two things to try and check:
          1. Include a time trend or a time dummies in the model.
          2. Confirm that ln Aid is money received by country A, and that all explanatory variables correspond to the recipient country.
          Perhaps that might help

          Comment


          • #6
            thank you, I shall try no 1.
            With regard to 2, ln(gdppercapita) and ln(population) correspond to the recipient country (whereas of course outputgap corresponds to the donor country and the relative export, and the relative export interactive term corresponds to both). I've put relevant values on all rows that are connected to the country in question (i.e. for example Sweden as a donor, output gap for a particular year is stated on every row for sweden that year, which would result in it being on every observation per recipient country that sweden gave aid to that year).
            Robin

            Comment


            • #7
              I tried introducing time dummies ln(population) now shows "the right" sign Seems reasonable that population has been increaing all the time. lngdpcap still shows the wrong sign and is significant though, hmm..

              But thanks for your help, nice to have gotten this far!
              Robin

              Comment


              • #8
                Hi, have you ran a population averaged/pooled OLS? I'm concerned that you seem to have one panel with just one time point. Also the R-squared measures are very concerning. Notice that you are saying that FE is preferred to RE, but I check your within R-squared and it is 0.0068, which is very small thus indicating very little within variation, indicating that it is the between variation that is relatively more important in your model. This is confirmed with rho = 0.79, indicating that about 80% of variation in your model is between variation. Since the signs are different in the RE and the FE estimation, it also signals that the between estimate of the coefficients differs from the within estimate of the coefficients. To check that simply do a between estimation (xtreg, be).

                To summarize, my intuition is that you have some panels that don't have enough time data points, which is causing you trouble in fixed effects. Notice that fixed effects is a demeaned estimator, so for those panels with one time point, the values there are zero for all variables. That's why I'm not convinced that fixed effects is appropriate, in particular after seeing the difference between the within and between variation. For more information about the within and between estimators, as well as random and fixed effects, check out http://www.stata.com/support/faqs/st...een-estimator/.
                Last edited by Alfonso Sánchez-Peñalver; 07 May 2014, 17:38.
                Alfonso Sanchez-Penalver

                Comment


                • #9
                  Hi, thank you for your answer..Data is from 1992 to 2009. For every recipient for example Sweden gave to one year, for instance 1992, I've put Swedens outputgap that year on every observation. Is this correct to do? The same goes for recipents with regard to population for instance, and gdp/cap. I dont know how to otherwise do it, since I am looking at donor-recipient pairs.

                  I have tried using both just simply "reg" and "xtreg .... , re" and I do then get the "right results" .. However I do not at the moment have the right control variables (like former colonial status and stuff like that) . And why I want to use FE is that what I am trying to do is answer how short-term economic fluctuations changes aid allocation with regard to trade. But I see now that within R-squared is very low yes.

                  xtreg lnaid lnexp realout lngdpcap lnpop lnrexpgap, be

                  Between regression (regression on group means) Number of obs = 58311
                  Group variable: rel Number of groups = 3755

                  R-sq: within = 0.0000 Obs per group: min = 1
                  between = 0.2057 avg = 15.5
                  overall = 0.1088 max = 18

                  F(5,3749) = 194.22
                  sd(u_i + avg(e_i.))= .5794317 Prob > F = 0.0000

                  ------------------------------------------------------------------------------
                  lnaid | Coef. Std. Err. t P>|t| [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                  lnexp | .1634916 .006408 25.51 0.000 .150928 .1760552
                  realout | -.0503255 .0338778 -1.49 0.137 -.1167461 .0160951
                  lngdpcap | -.2668141 .0101846 -26.20 0.000 -.286782 -.2468463
                  lnpop | -.2157686 .0079039 -27.30 0.000 -.2312651 -.2002722
                  lnrexpgap | .0001085 .0030713 0.04 0.972 -.0059131 .0061302
                  _cons | 7.211173 .2325987 31.00 0.000 6.755141 7.667206

                  the between estimator shows much more variation yes. I do have 154 recipient countries, 28 donor countries, over 17 years I think it was. So naturally there would be variation between relatively ritcher countries (both between recipients and donors I would asume)

                  But thank you so much for your answer, I did not look att the R-sq within number, we have only learned to analyze R-squares for commont cross section analysis so far, but yes it still seemed quite low

                  Robin

                  Comment


                  • #10
                    I shall try to explain the situation better

                    What complicated matters are that I do not know how to do it in stata since:

                    Regarding fixed effects:
                    1. Some donors are more altruistic, and thus give more aid, thus need donor fixed effects.
                    2. Some recipients get more aid because they are geographically strategically located, therefore need recipient fixed effects.
                    3. Some recipients get more from a donor, since it was a colony before or some other reasons, therefore need recipient-donor pair fixed effects
                    4. It could be trending, therefore might need time dummies.

                    In stata on row is of the relationship for each year.
                    1. Some variables (bilateral aid = lnaid and bilateral trade=lnexp) are of the relationship for each year.
                    2. Some variables (gdp/capita = lngdpcap and population = lnpop) are of the recipient for each year.
                    3. One variable (output gap = realout) is of the donor for each year.
                    No 2 and 3 are inserted on each row, thus for example output gap of Sweden 1992 is instered on every Sweden-recipient pair for 1992 (thus 154 times, which is the number of recipients). Equivalent for recipients variables, but 28 times since I have 28 donors.

                    What I wanna know is if donors shift aid allocation when they are experiencing economic bad times towards giving more to those recipients they are (with time) becoming closing trading partners with, in hoping that the recipient will import even more from the donor, which will dampen the economic bad times in the donor country.

                    If anyone knows how to solve this I would very much apprechiate it!

                    Thank you!
                    Robin

                    Comment


                    • #11
                      Fixed effects:
                      1. You say some donors are more altruistic. I understand that there are unobserved differences between the donors. That the differences are unobserved doesn't automatically mean that you need fixed effects, because you can model them with random effects. The underlying question is whether this unobserved altruism is correlated with the explanatory variables. If it is, you need fixed effects, if it's not random effects is the efficient estimator. However, in your case the assumption that the within and between estimators are the same seems to not hold, which is why I sent you the link. In there it's explained how you can model the within and between estimators under a random effects model, and then test whether fixed effects or random effects is better.
                      2. If the additional aid to the recipients is because of geographical location, what you need is a variable that captures these geographical locations. These could be dummies (fixed effects), or again random intercepts for the different geographical locations (random effects). They are not recipient fixed effects, but rather geographical fixed effects. The dummy can capture several recipients that have the same characteristics.
                      3. Not clear that you need recipient-donor pair fixed effects for this purpose. You just need a colony dummy to capture the fixed effects of being a colony, or again another random intercept for those observations that had a colonization relationship.
                      Alfonso Sanchez-Penalver

                      Comment


                      • #12
                        Hi!
                        Thank you again.
                        Yes, that is true I could get those control variables. My supervisor adviced me against using RE, since there are so many unobserved differences that governs aid allocation, just not those I mentioned. It is too bad that he is on vacation now. Getting geographical distance between 28 donors and 154 recipients might be difficult.
                        But if I were to use fixed effects, have I done it the right way? Others have gotten very different values (much larger variation, and the "right signs") and still used FE. I feel a bit unsure as to changing to RE now, especially since my supervisor would most likely ask me how the FE estimates looked like and why. Other who have studied similar issues have mostly used fixed effects, but some has used RE as well. And my question concerns recipients that are becoming closer trading partners with time, not those that happen to be for the full time period.

                        Thank you!
                        Robin
                        Last edited by robinb2; 08 May 2014, 08:48.

                        Comment


                        • #13
                          Robin, I am just giving you advice on things you can do. I am not familiar with your literature. I only saw some problems with the fixed effects estimation and then commented on the different fixed effects you needed. I obviously am not going to suggest you do anything against your supervisor's advice. However, you should point out the very small within R-squared and the between variation to him.

                          Best,
                          Alfonso Sanchez-Penalver

                          Comment


                          • #14
                            Yes, I am sorry and I very much apprechiate your advice! I would also prefer to use RE, but he advised against it. I was just wondering if I was doing something wrong with FE since the answer were not as expected (and others have gotten "right" answers with FE on similar problems). And it is true since I have roughly 3000 donor-recipient pairs, naturally the between differences will be large! Sadly he is on vacation and it is due before he comes back, so I will just have to figur out how to do, and I am just so confused.

                            Thank you very much!
                            Robin

                            Comment

                            Working...
                            X