Announcement

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

  • Dummy variable trap problem in panel data

    Hello everyone,

    I know I have to omit one of my dummy variables, however I struggle to know which code I have to use.

    These are my commands:

    Code:
    label define LMH    1   "Low"   2   "Medium"    3   "High"
    
    gen built_level:LMH = 1 if Built_area < 18.27
    replace built_level = 3 if Built_area > 25.981 & !missing(Built_area)
    replace built_level = 2 if missing(Built_area) & !missing(Built_area)
    
    label define ALMH    1   "Low"   2   "Medium"    3   "High"
    
    gen agri_level:LMH = 1 if Agri_area < 48.90
    replace agri_level = 3 if Agri_area > 54.75 & !missing(Agri_area)
    replace agri_level = 2 if missing(Agri_area) & !missing(Agri_area)
    
    label define NLMH    1   "Low"   2   "Medium"    3   "High"
    
    gen natural_level:LMH = 1 if NaturalForest_area < 7.3
    replace natural_level = 3 if NaturalForest_area > 15.82 & !missing(NaturalForest_area)
    replace natural_level = 2 if missing(NaturalForest_area) & !missing(NaturalForest_area)
    
    gen low_dev = (built_level==1 & agri_level==3 & natural_level==3)
    gen high_dev = (built_level==3 & agri_level==1 & natural_level==1)
    
    //low dev panel regression
    xtreg log_realHP logReal_income real_interest Unemployment_rate logrealconsind i.low_dev i.Year,fe cluster(GM_code) noomitted
    
    //high dev panel regression
    xtreg log_realHP logReal_income real_interest Unemployment_rate logrealconsind i.high_dev i.Year,fe cluster(GM_code) noomitted
    So my question is how can I create a regression for the second dummy medium dev in this case?

  • #2
    If I understand you, all you want to do is
    Code:
    reg y ib#.x
    where the # is a number you choose which reflects the base of the reference group, so if 1=low 2=medium and 3=high, 1 will by default be the reference group, and if you did reg y ib2.x, medium would be the reference, and so on.

    Comment


    • #3


      Originally posted by Jared Greathouse View Post
      If I understand you, all you want to do is

      [/CODE]
      Code:
      reg y ib#.x
      where the # is a number you choose which reflects the base of the reference group, so if 1=low 2=medium and 3=high, 1 will by default be the reference group, and if you did reg y ib2.x, medium would be the reference, and so on.
      Hello, I have tried that I am getting the following result:

      Code:
      . xtreg log_realHP logReal_income real_interest Unemployment_rate logrealconsind ib2.low_dev i.Year,fe cluster(GM_code) noo
      > mitted
      note: 1.low_dev omitted because of collinearity
      note: 2b.low_dev identifies no observations in the sample
      note: 2018.Year omitted because of collinearity
      note: 2019.Year omitted because of collinearity
      
      Fixed-effects (within) regression               Number of obs     =      2,250
      Group variable: GM_code                         Number of groups  =        282
      
      R-sq:                                           Obs per group:
           within  = 0.8376                                         min =          7
           between = 0.6949                                         avg =        8.0
           overall = 0.2922                                         max =          8
      
                                                      F(10,281)         =    1145.92
      corr(u_i, Xb)  = 0.3006                         Prob > F          =     0.0000
      
                                         (Std. Err. adjusted for 282 clusters in GM_code)
      -----------------------------------------------------------------------------------
                        |               Robust
             log_realHP |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      ------------------+----------------------------------------------------------------
         logReal_income |   .2536196   .0948343     2.67   0.008     .0669437    .4402955
          real_interest |    .339746   .0165974    20.47   0.000     .3070749     .372417
      Unemployment_rate |   .0378007    .009001     4.20   0.000     .0200828    .0555186
         logrealconsind |   9.257777   .3428145    27.01   0.000     8.582967    9.932588
                        |
                low_dev |
                     0  |  -.0137549   .0033905    -4.06   0.000    -.0204289   -.0070809
                     2  |          0  (empty)
                        |
                   Year |
                  2013  |   .5170496   .0258828    19.98   0.000     .4661008    .5679983
                  2014  |   .9228314    .037584    24.55   0.000     .8488495    .9968134
                  2015  |    1.02341   .0418906    24.43   0.000     .9409512     1.10587
                  2016  |   .5019165   .0200841    24.99   0.000     .4623821    .5414509
                  2017  |   .6891693   .0275876    24.98   0.000     .6348648    .7434739
                        |
                  _cons |  -97.26191   4.499401   -21.62   0.000    -106.1187    -88.4051
      ------------------+----------------------------------------------------------------
                sigma_u |   .2074402
                sigma_e |  .02872905
                    rho |   .9811806   (fraction of variance due to u_i)
      -----------------------------------------------------------------------------------
      It says there are no observations would it mean that I would have to change this line of code for the med development?


      Code:
      //L Low M Medium H high
      label define LMH    1   "Low"   2   "Medium"    3   "High"
      
      gen built_level:LMH = 1 if Built_area < 18.27
      replace built_level = 3 if Built_area > 25.981 & !missing(Built_area)
      replace built_level = 2 if missing(Built_area) & !missing(Built_area)
      
      label define ALMH    1   "Low"   2   "Medium"    3   "High"
      
      gen agri_level:LMH = 1 if Agri_area < 48.90
      replace agri_level = 3 if Agri_area > 54.75 & !missing(Agri_area)
      replace agri_level = 2 if missing(Agri_area) & !missing(Agri_area)
      
      label define NLMH    1   "Low"   2   "Medium"    3   "High"
      
      gen natural_level:LMH = 1 if NaturalForest_area < 7.3
      replace natural_level = 3 if NaturalForest_area > 15.82 & !missing(NaturalForest_area)
      replace natural_level = 2 if missing(NaturalForest_area) & !missing(NaturalForest_area)
      
      
      gen low_dev = (built_level==1 & agri_level==3 & natural_level==3)
      gen high_dev = (built_level==3 & agri_level==1 & natural_level==1)
      This shows the values for Built area, agri area and naturalforest area
      Code:
      GM_naam    Year    Built_area    Agri_area    NaturalForest_area
      's-Gravenhage    2000    58.1    4.1    13.6
      's-Gravenhage    2001            
      's-Gravenhage    2002            
      's-Gravenhage    2003    53.4    4.3    12.1
      's-Gravenhage    2004            
      's-Gravenhage    2005            
      's-Gravenhage    2006    55.7    3.2    12.1
      's-Gravenhage    2007            
      's-Gravenhage    2008    56.7    3    12
      's-Gravenhage    2009            
      's-Gravenhage    2010    57.7    3.1    12
      's-Gravenhage    2011            
      's-Gravenhage    2012    57.5    2.6    12.9
      's-Gravenhage    2013            
      's-Gravenhage    2014            
      's-Gravenhage    2015    58.2    2    13
      's-Gravenhage    2016            
      's-Gravenhage    2017            
      's-Gravenhage    2018            
      's-Gravenhage    2019            
      's-Gravenhage    2020            
      's-Hertogenbosch    2000    30.8    46.5    5.7
      's-Hertogenbosch    2001            
      's-Hertogenbosch    2002            
      's-Hertogenbosch    2003    31.3    44.6    5.7
      's-Hertogenbosch    2004            
      's-Hertogenbosch    2005            
      's-Hertogenbosch    2006    32.5    42.6    5.3
      's-Hertogenbosch    2007            
      's-Hertogenbosch    2008    32.3    41.3    5.2
      's-Hertogenbosch    2009            
      's-Hertogenbosch    2010    32.7    40.7    5.4
      's-Hertogenbosch    2011            
      's-Hertogenbosch    2012    32.7    41.2    5.4
      's-Hertogenbosch    2013            
      's-Hertogenbosch    2014            
      's-Hertogenbosch    2015    27    49.7    5.6
      's-Hertogenbosch    2016            
      's-Hertogenbosch    2017            
      's-Hertogenbosch    2018            
      's-Hertogenbosch    2019            
      's-Hertogenbosch    2020            
      Aa en Hunze    2000    3    70.6    22.2
      Aa en Hunze    2001            
      Aa en Hunze    2002            
      Aa en Hunze    2003    3.1    70.3    22.2
      Aa en Hunze    2004            
      Aa en Hunze    2005            
      Aa en Hunze    2006    3.2    69.8    22.5
      Aa en Hunze    2007            
      Aa en Hunze    2008    3.3    69.7    22.5
      Aa en Hunze    2009            
      Aa en Hunze    2010    3.3    69.2    22.8
      Aa en Hunze    2011            
      Aa en Hunze    2012    3.3    68.8    23.1
      Aa en Hunze    2013            
      Aa en Hunze    2014            
      Aa en Hunze    2015    3.5    67.9    23.9
      Aa en Hunze    2016            
      Aa en Hunze    2017            
      Aa en Hunze    2018            
      Aa en Hunze    2019            
      Aa en Hunze    2020            
      Aalsmeer    2000    24.3    49    11.7
      Aalsmeer    2001            
      Aalsmeer    2002            
      Aalsmeer    2003    25.3    53.4    5.3
      Aalsmeer    2004            
      Aalsmeer    2005            
      Aalsmeer    2006    28    49.5    6.9
      Aalsmeer    2007            
      Aalsmeer    2008    29.7    46    6.9
      Aalsmeer    2009            
      Aalsmeer    2010    32.2    43.6    6.9
      Aalsmeer    2011            
      Aalsmeer    2012    36.9    40.8    6.8
      Aalsmeer    2013            
      Aalsmeer    2014            
      Aalsmeer    2015    37.8    39.7    6.8
      Aalsmeer    2016            
      Aalsmeer    2017            
      Aalsmeer    2018            
      Aalsmeer    2019            
      Aalsmeer    2020            
      Aalten    2000    4.7    85.2    5.2
      Aalten    2001            
      Aalten    2002            
      Aalten    2003    4.8    85.2    4.8
      Aalten    2004            
      Aalten    2005            
      Aalten    2006    6.5    83.8    4.4
      Aalten    2007            
      Aalten    2008    6.6    83.8    4.3
      Aalten    2009            
      Aalten    2010    6.7    83.7    4.3
      Aalten    2011            
      Aalten    2012    6.7    83.8    4.3
      Aalten    2013            
      Aalten    2014            
      Aalten    2015    7    83.5    4.3
      Aalten    2016            
      Aalten    2017            
      Aalten    2018            
      Aalten    2019            
      Aalten    2020            
      Achtkarspelen    2000    7.6    87.8    .9
      Achtkarspelen    2001            
      Achtkarspelen    2002            
      Achtkarspelen    2003    7.8    87.2    1
      Achtkarspelen    2004            
      Achtkarspelen    2005            
      Achtkarspelen    2006    8.3    85.9    1.5
      Achtkarspelen    2007            
      Achtkarspelen    2008    8.5    85.2    2
      Achtkarspelen    2009            
      Achtkarspelen    2010    8.8    84.5    2.4
      Achtkarspelen    2011            
      Achtkarspelen    2012    8.9    84.2    2.5
      Achtkarspelen    2013            
      Achtkarspelen    2014            
      Achtkarspelen    2015    9    83.7    2.8
      Achtkarspelen    2016            
      Achtkarspelen    2017            
      Achtkarspelen    2018            
      Achtkarspelen    2019            
      Achtkarspelen    2020            
      Alblasserdam    2000    37.2    40.9    2.4
      Alblasserdam    2001            
      Alblasserdam    2002            
      Alblasserdam    2003    38.6    36    2.4
      Alblasserdam    2004            
      Alblasserdam    2005            
      Alblasserdam    2006    40.5    34.3    2.3
      Alblasserdam    2007            
      Alblasserdam    2008    40.6    34.3    2.2
      Alblasserdam    2009            
      Alblasserdam    2010    43.5    34.4    2.1
      Alblasserdam    2011            
      Alblasserdam    2012    45    34    2.1
      Alblasserdam    2013            
      Alblasserdam    2014            
      Alblasserdam    2015    47.2    34    2.1
      Alblasserdam    2016            
      Alblasserdam    2017            
      Alblasserdam    2018            
      Alblasserdam    2019            
      Alblasserdam    2020            
      Albrandswaard    2000    16.8    61.2    10.3
      Albrandswaard    2001            
      Albrandswaard    2002            
      Albrandswaard    2003    17.9    58.3    11.2
      Albrandswaard    2004            
      Albrandswaard    2005            
      Albrandswaard    2006    18.8    50.8    11.7
      Albrandswaard    2007            
      Albrandswaard    2008    20.4    50.4    11.6
      Albrandswaard    2009            
      Albrandswaard    2010    20.9    49.9    12.3
      Albrandswaard    2011            
      Albrandswaard    2012    22.1    48.9    12.9
      Albrandswaard    2013            
      Albrandswaard    2014            
      Albrandswaard    2015    22.2    49.6    12.8
      Albrandswaard    2016            
      Albrandswaard    2017            
      Albrandswaard    2018            
      Albrandswaard    2019            
      Albrandswaard    2020            
      Alkmaar    2000    50.7    24.6    1
      Alkmaar    2001            
      Alkmaar    2002            
      Alkmaar    2003    52.8    21.5    .7
      Alkmaar    2004            
      Alkmaar    2005            
      Alkmaar    2006    54.3    19.1    .7
      Alkmaar    2007            
      Alkmaar    2008    55.1    17.9    .7
      Alkmaar    2009            
      Alkmaar    2010    54.8    16.9    .7
      Alkmaar    2011            
      Alkmaar    2012    55.4    15.9    .7
      Alkmaar    2013            
      Alkmaar    2014            
      Alkmaar    2015    17.2    70.9    1.6
      Alkmaar    2016            
      Alkmaar    2017            
      Alkmaar    2018            
      Alkmaar    2019            
      Alkmaar    2020            
      Almelo    2000    39.2    39.8    6.7
      Almelo    2001            
      Almelo    2002            
      Almelo    2003    25.9    56.3    6.2
      Almelo    2004            
      Almelo    2005            
      Almelo    2006    26.8    54.6    6
      Almelo    2007            
      Almelo    2008    27.4    53.6    5.9
      Almelo    2009            
      Almelo    2010    27.5    53.3    6.1
      Almelo    2011            
      Almelo    2012    27.7    52.8    6.1
      Almelo    2013            
      Almelo    2014            
      Almelo    2015    27.8    51.6    6.4
      Almelo    2016            
      Almelo    2017            
      Almelo    2018            
      Almelo    2019            
      Almelo    2020            
      Almere    2000    18.1    33.5    24.5
      Almere    2001            
      Almere    2002            
      Almere    2003    20.4    27.3    25.6
      Almere    2004            
      Almere    2005            
      Almere    2006    22.3    27.7    25.1
      Almere    2007            
      Almere    2008    23    26.9    25.4
      Almere    2009            
      Almere    2010    23.7    26    26.5
      Almere    2011            
      Almere    2012    24.3    25.2    26.1
      Almere    2013            
      Almere    2014            
      Almere    2015    25    25.1    25.3
      Almere    2016            
      Almere    2017            
      Almere    2018            
      Almere    2019            
      Almere    2020            
      Alphen aan den Rijn    2000    19.5    66.7    .7
      Alphen aan den Rijn    2001            
      Alphen aan den Rijn    2002            
      Alphen aan den Rijn    2003    18.7    65.1    .1
      Alphen aan den Rijn    2004            
      Alphen aan den Rijn    2005            
      Alphen aan den Rijn    2006    20.5    65.1    .1
      Alphen aan den Rijn    2007            
      Alphen aan den Rijn    2008    20.8    65.1    .1
      Alphen aan den Rijn    2009            
      Alphen aan den Rijn    2010    20.7    64.6    .1
      Alphen aan den Rijn    2011            
      Alphen aan den Rijn    2012    21.1    64.7    .1
      Alphen aan den Rijn    2013            
      Alphen aan den Rijn    2014            
      Alphen aan den Rijn    2015    14.4    73.1    1
      Alphen aan den Rijn    2016            
      Alphen aan den Rijn    2017            
      Alphen aan den Rijn    2018            
      Alphen aan den Rijn    2019            
      Alphen aan den Rijn    2020            
      Alphen-Chaam    2000    3    72    21.4
      Alphen-Chaam    2001            
      Alphen-Chaam    2002            
      Alphen-Chaam    2003    2.2    71.8    22.2
      Alphen-Chaam    2004            
      Alphen-Chaam    2005            
      Alphen-Chaam    2006    3.3    71.7    21.2
      Alphen-Chaam    2007            
      Alphen-Chaam    2008    3.3    71.7    21.2
      Alphen-Chaam    2009            
      Alphen-Chaam    2010    3.4    71.5    21.4
      Alphen-Chaam    2011            
      Alphen-Chaam    2012    3.5    70.8    21.7
      Alphen-Chaam    2013            
      Alphen-Chaam    2014            
      Alphen-Chaam    2015    3.5    70.4    22
      Alphen-Chaam    2016            
      Alphen-Chaam    2017            
      Alphen-Chaam    2018            
      Alphen-Chaam    2019            
      Alphen-Chaam    2020            
      Ameland    2000    2.1    34.3    56.6
      Ameland    2001            
      Ameland    2002            
      Ameland    2003    2.4    34.6    56.4
      Ameland    2004            
      Ameland    2005            
      Ameland    2006    2.5    34.1    56.1
      Ameland    2007            
      Ameland    2008    2.6    34.4    56
      Ameland    2009            
      Ameland    2010    2.6    34.7    55.5
      Ameland    2011            
      Ameland    2012    2.7    34.5    55.5
      Ameland    2013            
      Ameland    2014            
      Ameland    2015    2.8    33.4    56.5
      Ameland    2016            
      Ameland    2017            
      Ameland    2018            
      Ameland    2019            
      Ameland    2020            
      Amersfoort    2000    36.2    40.4    8.5
      Amersfoort    2001            
      Amersfoort    2002            
      Amersfoort    2003    38    38.4    7.9
      Amersfoort    2004            
      Amersfoort    2005            
      Amersfoort    2006    39.5    34.7    8.1
      Amersfoort    2007            
      Amersfoort    2008    40.5    33.5    8.2
      Amersfoort    2009            
      Amersfoort    2010    40.3    32.3    8.1
      Amersfoort    2011            
      Amersfoort    2012    41.5    31.5    8.2
      Amersfoort    2013            
      Amersfoort    2014            
      Amersfoort    2015    41.8    31.1    8.7
      Amersfoort    2016            
      Amersfoort    2017            
      Amersfoort    2018            
      Amersfoort    2019            
      Amersfoort    2020            
      Amstelveen    2000    29.7    47.6    6.6
      Amstelveen    2001            
      Amstelveen    2002            
      Amstelveen    2003    29.3    43.9    9.8
      Amstelveen    2004            
      Amstelveen    2005            
      Amstelveen    2006    28.4    43.2    9.8
      Amstelveen    2007            
      Amstelveen    2008    28.4    41.8    9.9
      Amstelveen    2009            
      Amstelveen    2010    28.9    40.7    10.5
      Amstelveen    2011            
      Amstelveen    2012    28.7    38.8    10.7
      Amstelveen    2013            
      Amstelveen    2014            
      Amstelveen    2015    29.6    38.8    10.8
      Amstelveen    2016            
      Amstelveen    2017            
      Amstelveen    2018            
      Amstelveen    2019            
      Amstelveen    2020            
      Amsterdam    2000    46.3    17.9    2.7
      Amsterdam    2001            
      Amsterdam    2002            
      Amsterdam    2003    46    17    2.6
      Amsterdam    2004            
      Amsterdam    2005            
      Amsterdam    2006    46.9    16.9    2.8
      Amsterdam    2007            
      Amsterdam    2008    47.5    17    2.8
      Amsterdam    2009            
      Amsterdam    2010    47.8    16.9    2.8
      Amsterdam    2011            
      Amsterdam    2012    48.7    16.2    2.7
      Amsterdam    2013            
      Amsterdam    2014            
      Amsterdam    2015    48.5    16.4    3.1
      Amsterdam    2016            
      Amsterdam    2017            
      Amsterdam    2018            
      Amsterdam    2019            
      Amsterdam    2020            
      Apeldoorn    2000    10.1    26.1    57.4
      Apeldoorn    2001            
      Apeldoorn    2002            
      Apeldoorn    2003    10.3    25.8    57.3
      Apeldoorn    2004            
      Apeldoorn    2005            
      Apeldoorn    2006    10.5    25.5    57.2
      Apeldoorn    2007            
      Apeldoorn    2008    10.7    25.2    57.2
      Apeldoorn    2009            
      Apeldoorn    2010    10.6    25    57.3
      Apeldoorn    2011            
      Apeldoorn    2012    11.1    24.7    57.4
      Apeldoorn    2013            
      Apeldoorn    2014            
      Apeldoorn    2015    11.2    24.5    57.5
      Apeldoorn    2016            
      Apeldoorn    2017            
      Apeldoorn    2018            
      Apeldoorn    2019            
      Apeldoorn    2020            
      Arnhem    2000    26.1    20    35.7
      Arnhem    2001            
      Arnhem    2002            
      Arnhem    2003    26.3    17.8    36
      Arnhem    2004            
      Arnhem    2005            
      Arnhem    2006    26.8    16.7    35.9
      Arnhem    2007            
      Arnhem    2008    27    16.6    36.3
      Arnhem    2009            
      Arnhem    2010    27.2    16    36.9
      Arnhem    2011            
      Arnhem    2012    27.6    16.3    37.2
      Arnhem    2013            
      Arnhem    2014            
      Arnhem    2015    27.6    16.3    37.2
      Arnhem    2016            
      Arnhem    2017            
      Arnhem    2018            
      Arnhem    2019            
      Arnhem    2020            
      Assen    2000    19.1    56.6    12.3
      Assen    2001            
      Assen    2002            
      Assen    2003    19.7    51.3    13.9
      Assen    2004            
      Assen    2005            
      Assen    2006    20.9    49.1    14.8
      Assen    2007            
      Assen    2008    22.1    48.1    15.5
      Assen    2009            
      Assen    2010    22.2    48.1    15.4
      Assen    2011            
      Assen    2012    22.2    47.9    15.2
      Assen    2013            
      Assen    2014            
      Assen    2015    22.4    47.3    15.5
      Assen    2016            
      Assen    2017            
      Assen    2018            
      Assen    2019            
      Assen    2020            
      Baarle-Nassau    2000    2    83.8    10.8
      Baarle-Nassau    2001            
      Baarle-Nassau    2002            
      Baarle-Nassau    2003    2.1    83.6    10.8
      Baarle-Nassau    2004            
      Baarle-Nassau    2005            
      Baarle-Nassau    2006    2.2    83.6    10.8
      Baarle-Nassau    2007            
      Baarle-Nassau    2008    2.1    83.5    10.8
      Baarle-Nassau    2009            
      Baarle-Nassau    2010    2.3    83.5    10.8
      Baarle-Nassau    2011            
      Baarle-Nassau    2012    2.3    83.1    11
      Baarle-Nassau    2013            
      Baarle-Nassau    2014            
      Baarle-Nassau    2015    2.5    82.4    11.4
      Baarle-Nassau    2016            
      Baarle-Nassau    2017            
      Baarle-Nassau    2018            
      Baarle-Nassau    2019            
      Baarle-Nassau    2020            
      Baarn    2000    17.2    23.7    51.6
      Baarn    2001            
      Baarn    2002            
      Baarn    2003    17.5    23.7    51.4
      Baarn    2004            
      Baarn    2005            
      Baarn    2006    18.2    23.8    50.6
      Baarn    2007            
      Baarn    2008    18.6    23.6    50.4
      Baarn    2009            
      Baarn    2010    18.5    23.8    50.4
      Baarn    2011            
      Baarn    2012    18.8    23.7    50.3
      Baarn    2013            
      Baarn    2014            
      Baarn    2015    18.8    23.4    50.4
      Baarn    2016            
      Baarn    2017            
      Baarn    2018            
      Baarn    2019            
      Baarn    2020            
      Barendrecht    2000    28.6    34.3    3.2
      Barendrecht    2001            
      Barendrecht    2002            
      Barendrecht    2003    33.4    25.7    3.1
      Barendrecht    2004            
      Barendrecht    2005            
      Barendrecht    2006    34.9    22.5    3.1
      Barendrecht    2007            
      Barendrecht    2008    42.7    21.9    3
      Barendrecht    2009            
      Barendrecht    2010    44.4    21.3    3.2
      Barendrecht    2011            
      Barendrecht    2012    45    20.5    3.1
      Barendrecht    2013            
      Barendrecht    2014            
      Barendrecht    2015    46.1    16.2    4.1
      Barendrecht    2016            
      Barendrecht    2017            
      Barendrecht    2018            
      Barendrecht    2019            
      Barendrecht    2020            
      Barneveld    2000    6    56.5    30.9
      Barneveld    2001            
      Barneveld    2002            
      Barneveld    2003    6.4    56.2    30.6
      Barneveld    2004            
      Barneveld    2005            
      Barneveld    2006    7    56    30.1
      Barneveld    2007            
      Barneveld    2008    7.1    55.8    30.1
      Barneveld    2009            
      Barneveld    2010    7.4    55.2    30.2
      Barneveld    2011            
      Barneveld    2012    7.8    54.9    30.1
      Barneveld    2013            
      Barneveld    2014            
      Barneveld    2015    8.1    54.4    30.2
      Barneveld    2016            
      Barneveld    2017            
      Barneveld    2018            
      Barneveld    2019            
      Barneveld    2020            
      Beek    2000    18.2    64.6    2.3
      Beek    2001            
      Beek    2002            
      Beek    2003    18.9    64    2.8
      Beek    2004            
      Beek    2005            
      Beek    2006    19.6    63.4    2.8
      Beek    2007            
      Beek    2008    20.4    63.1    2.9
      Beek    2009            
      Beek    2010    20.6    62    3
      Beek    2011            
      Beek    2012    20.7    61.2    3
      Beek    2013            
      Beek    2014            
      Beek    2015    21.1    61    3
      Beek    2016            
      Beek    2017            
      Beek    2018            
      Beek    2019            
      Beek    2020            
      Beemster    2000    2.3    92.7    .2
      Beemster    2001            
      Beemster    2002            
      Beemster    2003    2.6    92.6    .2
      Beemster    2004            
      Beemster    2005            
      Beemster    2006    2.6    92.4    .3
      Beemster    2007            
      Beemster    2008    2.8    92.2    .2
      Beemster    2009            
      Beemster    2010    2.9    92.1    .3
      Beemster    2011            
      Beemster    2012    2.9    92.1    .3
      Beemster    2013            
      Beemster    2014            
      Beemster    2015    2.9    91.8    .3
      Beemster    2016            
      Beemster    2017            
      Beemster    2018            
      Beemster    2019            
      Beemster    2020

      Comment


      • #4
        Adam:
        even a very poor toy-example elaborated on your dataset confirm that -2b.low_dev identifies no observations in the sample-:
        Code:
        . gen regressand=runiform()
        
        . encode GM_naam, g(num_GM_naam)
        
        . xtset num_GM_naam Year
        
        Panel variable: num_GM_naam (strongly balanced)
         Time variable: Year, 2000 to 2015, but with gaps
                 Delta: 1 unit
        
        . xtreg regressand  ib2.low_dev i.Year,fe cluster(num_GM_naam)
        note: 1.low_dev omitted because of collinearity.
        note: 2b.low_dev identifies no observations in the sample.
        
        Fixed-effects (within) regression               Number of obs     =        154
        Group variable: num_GM_naam                     Number of groups  =         22
        
        R-squared:                                      Obs per group:
             Within  = 0.0666                                         min =          7
             Between = 0.0541                                         avg =        7.0
             Overall = 0.0102                                         max =          7
        
                                                        F(6,21)           =          .
        corr(u_i, Xb) = -0.3409                         Prob > F          =          .
        
                                   (Std. err. adjusted for 22 clusters in num_GM_naam)
        ------------------------------------------------------------------------------
                     |               Robust
          regressand | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
        -------------+----------------------------------------------------------------
             low_dev |
                  0  |   .2065862   .0609619     3.39   0.003     .0798089    .3333635
                  1  |          0  (omitted)
                  2  |          0  (empty)
                     |
                Year |
               2003  |   -.130708    .081618    -1.60   0.124     -.300442    .0390259
               2006  |   -.155032   .0843649    -1.84   0.080    -.3304784    .0204143
               2008  |  -.0063805   .0828511    -0.08   0.939    -.1786789    .1659178
               2010  |   .0257284   .0905743     0.28   0.779    -.1626313     .214088
               2012  |  -.0722327   .0958629    -0.75   0.460    -.2715906    .1271253
               2015  |  -.1100286   .0712226    -1.54   0.137    -.2581442     .038087
                     |
               _cons |   .3705415   .0825633     4.49   0.000     .1988416    .5422413
        -------------+----------------------------------------------------------------
             sigma_u |  .17046501
             sigma_e |  .27747866
                 rho |  .27399881   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        
        .
        This is simply a matter of fact.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Adam:
          even a very poor toy-example elaborated on your dataset confirm that -2b.low_dev identifies no observations in the sample-:
          Code:
          . gen regressand=runiform()
          
          . encode GM_naam, g(num_GM_naam)
          
          . xtset num_GM_naam Year
          
          Panel variable: num_GM_naam (strongly balanced)
          Time variable: Year, 2000 to 2015, but with gaps
          Delta: 1 unit
          
          . xtreg regressand ib2.low_dev i.Year,fe cluster(num_GM_naam)
          note: 1.low_dev omitted because of collinearity.
          note: 2b.low_dev identifies no observations in the sample.
          
          Fixed-effects (within) regression Number of obs = 154
          Group variable: num_GM_naam Number of groups = 22
          
          R-squared: Obs per group:
          Within = 0.0666 min = 7
          Between = 0.0541 avg = 7.0
          Overall = 0.0102 max = 7
          
          F(6,21) = .
          corr(u_i, Xb) = -0.3409 Prob > F = .
          
          (Std. err. adjusted for 22 clusters in num_GM_naam)
          ------------------------------------------------------------------------------
          | Robust
          regressand | Coefficient std. err. t P>|t| [95% conf. interval]
          -------------+----------------------------------------------------------------
          low_dev |
          0 | .2065862 .0609619 3.39 0.003 .0798089 .3333635
          1 | 0 (omitted)
          2 | 0 (empty)
          |
          Year |
          2003 | -.130708 .081618 -1.60 0.124 -.300442 .0390259
          2006 | -.155032 .0843649 -1.84 0.080 -.3304784 .0204143
          2008 | -.0063805 .0828511 -0.08 0.939 -.1786789 .1659178
          2010 | .0257284 .0905743 0.28 0.779 -.1626313 .214088
          2012 | -.0722327 .0958629 -0.75 0.460 -.2715906 .1271253
          2015 | -.1100286 .0712226 -1.54 0.137 -.2581442 .038087
          |
          _cons | .3705415 .0825633 4.49 0.000 .1988416 .5422413
          -------------+----------------------------------------------------------------
          sigma_u | .17046501
          sigma_e | .27747866
          rho | .27399881 (fraction of variance due to u_i)
          ------------------------------------------------------------------------------
          
          .
          This is simply a matter of fact.
          I understand so I guess the best thing to do is to study only low development and high development and then compare them if there is a significant difference in house prices?

          Comment


          • #6
            Adam:
            If your observations can be classified as -low_dev- only, there's no gain in keeping this time-invariant predictor in, because the -fe- estimator will wipe it out.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Adam:
              If your observations can be classified as -low_dev- only, there's no gain in keeping this time-invariant predictor in, because the -fe- estimator will wipe it out.
              I only have high dev and low dev and no observations for med dev

              Comment


              • #8
                I'll explain it this way: you have no medium development observations in your dataset. If the levels of development don't vary over time, there's no sense in having the development predictors in at all, because anything that is time invariant is absorbed into the fixed effects. The regression above tells us that no observations are identified by the low development metric. You have a data problem.

                You can remove the high and low dev variables from your dataset entirely.

                Comment


                • #9
                  Originally posted by Jared Greathouse View Post
                  I'll explain it this way: you have no medium development observations in your dataset. If the levels of development don't vary over time, there's no sense in having the development predictors in at all, because anything that is time invariant is absorbed into the fixed effects. The regression above tells us that no observations are identified by the low development metric. You have a data problem.

                  You can remove the high and low dev variables from your dataset entirely.
                  Hello thanks Jared for responding, so I was wondering what is the best way to deal with my data. As you said there time invariation is absorbed by the fixed effects.
                  Initially my plan was to make three subsamples and dividing it into three dummies, I am not sure what to do know im a bit clueless. Do you have any recommendations as you stated that I have a data problem?

                  Comment


                  • #10
                    For me to tell you what you should do, I'd like you to talk a little about why this indicator variable matters to you at all. Like what's your research question, what really are we talking about here, what're the main parameters of interest? Why do development levels matter and how are we defining them in this instance?

                    Comment


                    • #11
                      Originally posted by Jared Greathouse View Post
                      For me to tell you what you should do, I'd like you to talk a little about why this indicator variable matters to you at all. Like what's your research question, what really are we talking about here, what're the main parameters of interest? Why do development levels matter and how are we defining them in this instance?
                      I want to study the "The Effects of Supply Constraints on the Housing Market in The Netherlands", the dependent variable in my model is House price. Independent variables are; income,mortgage rate,unemployment rate, construction cost(cost of building a new house), CPI index is only used to deflate income and construction cost. I have read papers about supply constraints for example in England and I follow a similar panel data model. They divided the sample into three subsamples like low,medium and high development and they assume that low developed cities have less supply constraints compared to higher developed cities. With the dummies I wanted to divide the sample as what they did into three subsamples and then run a fixed effects model and compare the coefficients with each other.

                      Forgot to add I use Built area which is a percentage that tells how much of the land in a municipality is already urbanized, another variable I use is agricultural area which tells us how much of the land in a municipality is relatively agricultural land and at last natural forest land is basically the percentage of land is that forest.

                      I use the means of each of these variables and then say everything below the mean is low and everything higher than .5 standard deviation + mean is high developed.
                      Basically trying to explain that high developed cities tend to have higher house prices because of the restrictions
                      set by the government.
                      Last edited by Adam Klaas; 05 Feb 2022, 14:55.

                      Comment


                      • #12
                        Adam:
                        as Jared Greathouse already pointed out, the isisue is mainly technical here. If you go -fe-, the estimator will wipe out any time-invariant variable. Hence, if your -low_dep- classification does not change within panels during the time horizon your panel dataset stretches over, no coefficient will be reported.
                        Kind regards,
                        Carlo
                        (StataNow 18.5)

                        Comment

                        Working...
                        X