Announcement

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

  • Fixed effect model with controlled variables

    Hi all. I am using a fixed-effect model to reveal the impact of some factors on the land price (I have observations for 24 countries for 17 years). The code is the following:

    global id country
    global t year
    global ylist land_price
    global xlist yields_fruits agr_output input_price real_interest gov_bond inflation
    sort $id $t
    xtreg $ylist $xlist, fe

    Click image for larger version

Name:	FE final.jpeg
Views:	3
Size:	240.1 KB
ID:	1512917

    But as you may know, besides those factors, there are country policies that changed over time and influenced the land price (e.g., restriction on ownership). I have a few additional variables that describe these changes, but its dummy variables (0 - restricted ownership, 1 - no restrictions) and its values vary over time (data for again 24 countries for 17 years).

    The question is how to catch the effect of those policies? Should I control for them or which code what be the most suitable. Thank you

  • #2
    There are no issues with including time varying dummy variables on the right hand side in a fixed effects model. Just use Stata's factor variable notation.

    Code:
    xtreg y x1 x2 i.x3, cluster(country)
    where x3 is the dummy variable. I would also cluster the standard errors at the panel level (country in your case). The interpretation of such coefficients is exactly as in OLS.

    Comment


    • #3
      Andrew, thank you.
      Click image for larger version

Name:	12.jpeg
Views:	1
Size:	240.2 KB
ID:	1513077


      It helped. However, I have a few more questions:

      (1) In the example above, as you suggested I introduced a dummy variable - "right to own the land for foreigners: 1 - prohibited, 2 or 3 - partial, and 4 - permitted". The regression gives me the coefficient for each of it. The question is how to interpret them and how to capture the effect of right_foreign2 == 0 (which is currently omitted)

      (2) Another question would it be correct to use a slightly different approach. Can I just simply run several regressions and each time change the clause with "if". Thus, by varying those conditions I can receive estimates of the land price. In this case, I receive quite logical outcomes, the question is whether it is allowed to do it in this way?

      Code:
       xtreg land_price yields_fruits agr_output input_price real_interest gov_bond inflation if right_invest == 1, fe cluster (country)
      Thank you.

      Comment


      • #4
        Kate:
        1) you can use -predict- results and disentangle the contribution of each coefficient to the fitted values. See the following (and hypersimpified) toy-example:
        Code:
        . use "http://www.stata-press.com/data/r15/union.dta"
        
        . xtreg age i.not_smsa, fe
        
        Fixed-effects (within) regression               Number of obs     =     26,200
        Group variable: idcode                          Number of groups  =      4,434
        
        R-sq:                                           Obs per group:
             within  = 0.0004                                         min =          1
             between = 0.0039                                         avg =        5.9
             overall = 0.0011                                         max =         12
        
                                                        F(1,21765)        =       9.50
        corr(u_i, Xb)  = -0.0147                        Prob > F          =     0.0021
        
        ------------------------------------------------------------------------------
                 age |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
          1.not_smsa |   .6099405   .1979175     3.08   0.002     .2220077    .9978733
               _cons |   30.25917   .0663535   456.03   0.000     30.12911    30.38923
        -------------+----------------------------------------------------------------
             sigma_u |  4.7521163
             sigma_e |  5.7227803
                 rho |   .4081232   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(4433, 21765) = 2.68                 Prob > F = 0.0000
        
        . predict fitted, xb
        
        . bysort not_smsa: sum fitted
        
        -------------------------------------------------------------------------------------------------------------------
        -> not_smsa = 0
        
            Variable |        Obs        Mean    Std. Dev.       Min        Max
        -------------+---------------------------------------------------------
              fitted |     18,767    30.25917           0   30.25917   30.25917
        
        -------------------------------------------------------------------------------------------------------------------
        -> not_smsa = 1
        
            Variable |        Obs        Mean    Std. Dev.       Min        Max
        -------------+---------------------------------------------------------
              fitted |      7,433    30.86911           0   30.86911   30.86911
        
        
        .
        2) I would stick with your current approach.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          To add to Carlo's insightful comments, you can use the test command to test differences between the groups that are explicit in the regression table. The coefficients displayed are differences between the predicted dependent variable for a group and for the reference group (which is omitted). For example, in Carlo's example in #2, 30.86911- 30.25917= 0.6099405.

          Code:
          *Example
          test 2.rightforeign2= 3.rightforeign2

          Comment


          • #6
            Dear Carlo and Andrew, thank you so much. It really helped

            Comment

            Working...
            X