Announcement

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

  • fixed effect in policy adoption data

    I really hope you feel safe and healthy.

    I am coding policy adoption data in 48 U.S. states, and the dependent variable is whether or not states have adopted a policy. In this sense, after the adoption year, the observations are dropped. I am not sure whether I have to collect and code data after the adoption year but I think this does not make sense. This is because the likelihood after the adoption year is influenced by previous data, so there is an intertemporal correlation before and after the adoption year.

    As a result, when I used "xtlogit" with fixed-effect, it shows "outcome does not vary in any group." Does it mean there is no within variation in groups? I think this is because there is only one adoption in the dataset, so STATA cannot compare the likelihood, but I am not sure.
    I think just the "logit" command makes sense, though the adoption of the policy comes from the motivations and backgrounds within the states, not the comparison between the states (And I controlled the diffusion effect). Furthermore, if I use the logit model, It also has the same problem above, which means how I care and code data after the adoption year. Is only an alternative to use the event history model?




  • #2
    Sukyae:
    it means that the same value (1 or 0, depending on the way you coded the levels of the dichotomous regressand) is repeated within panels.
    Neither -xtlogit, fe-, nor - logit- can work if regressand does not vary.
    As an aside, pleaee follow the FAQ and post what you typed and what Stata gave you back. Thanks.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thank you for your response.

      Code:
      clear
      input str14 state int year byte adoptrps
      
      "Arizona"    1990 0
      "Arizona"    1991 0
      "Arizona"    1992 0
      "Arizona"    1993 0
      "Arizona"    1994 0
      "Arizona"    1995 0
      "Arizona"    1996 0
      "Arizona"    1997 0
      "Arizona"    1998 0
      "Arizona"    1999 0
      "Arizona"    2000 0
      "Arizona"    2001 0
      "Arizona"    2002 0
      "Arizona"    2003 0
      "Arizona"    2004 0
      "Arizona"    2005 0
      "Arizona"    2006 1
      "Arkansas"   1990 0
      "Arkansas"   1991 0
      "Arkansas"   1992 0
      "Arkansas"   1993 0
      "Arkansas"   1994 0
      "Arkansas"   1995 0
      "Arkansas"   1996 0
      "Arkansas"   1997 0
      "Arkansas"   1998 0
      "Arkansas"   1999 0
      "Arkansas"   2000 0
      "Arkansas"   2001 0
      "Arkansas"   2002 0
      "Arkansas"   2003 0
      "Arkansas"   2004 0
      "Arkansas"   2005 0
      "Arkansas"   2006 0
      "Arkansas"   2007 0
      "Arkansas"   2008 0
      "Arkansas"   2009 0
      "Arkansas"   2010 0
      "Arkansas"   2011 0
      "Arkansas"   2012 0
      "Arkansas"   2013 0
      "Arkansas"   2014 0
      "Arkansas"   2015 0
      end
      This is the coding I am using. Since Arizona adopted the policy in 2006, it is dropped. Arkansas does not adopt the policy, so it remains until 2015.

      1. The normal logit model

      Code:
      logit adoptrps c.repmean##c.peopleideo c.fossilper c.emission c.gdp c.unemploylag c.govideolag c.ideodiff c.price i.dem c.profess, nolog cluster(state)
      
      Logistic regression                                     Number of obs =    596
                                                              Wald chi2(12) =  41.15
                                                              Prob > chi2   = 0.0000
      Log pseudolikelihood = -85.747202                       Pseudo R2     = 0.2605
      
                                                 (Std. err. adjusted for 48 clusters in state)
      ----------------------------------------------------------------------------------------
                             |               Robust
                    adoptrps | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
      -----------------------+----------------------------------------------------------------
                     repmean |  -.5666919     .21571    -2.63   0.009    -.9894757   -.1439081
                  peopleideo |  -.4091162    .156218    -2.62   0.009    -.7152978   -.1029346
                             |
      c.repmean#c.peopleideo |   .0109743   .0038899     2.82   0.005     .0033502    .0185985
                             |
                   fossilper |   .0030436   .0086548     0.35   0.725    -.0139195    .0200066
                    emission |   5.96e-09   1.04e-08     0.58   0.565    -1.43e-08    2.63e-08
                         gdp |   1.71e-06   8.30e-07     2.06   0.040     8.06e-08    3.33e-06
                 unemploylag |  -.2343428   .1428422    -1.64   0.101    -.5143084    .0456227
                  govideolag |  -.0106918   .0239021    -0.45   0.655    -.0575391    .0361554
                    ideodiff |  -.0338794    .023423    -1.45   0.148    -.0797876    .0120288
                       price |   .0667522   .0916212     0.73   0.466     -.112822    .2463265
                       1.dem |    1.29745   .6208605     2.09   0.037      .080586    2.514314
                     profess |    -.53709   .2134886    -2.52   0.012      -.95552   -.1186599
                       _cons |   18.39559   8.863633     2.08   0.038     1.023189    35.76799
      ----------------------------------------------------------------------------------------
      Note: 1 failure and 0 successes completely determined.

      2. The xtlogit model. Data in each state is dropped after the adoption year.

      Code:
      xtlogit adoptrps c.repmean##c.peopleideo c.fossilper c.emission c.gdp c.unemploylag c.govideolag c.ideodiff c.price i.dem c.profess, nolog fe
      
      note: 22 groups (364 obs) omitted because of all positive or
            all negative outcomes.
      convergence not achieved
      
      Conditional fixed-effects logistic regression        Number of obs    =    232
      Group variable: id                                   Number of groups =     26
      
                                                           Obs per group:
                                                                        min =      2
                                                                        avg =    8.9
                                                                        max =     19
      
                                                           LR chi2(1)       = 108.00
      Log likelihood = 0                                   Prob > chi2      = 0.0000
      
      ----------------------------------------------------------------------------------------
                    adoptrps | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      -----------------------+----------------------------------------------------------------
                     repmean |  -68.78283          .        .       .            .           .
                  peopleideo |  -33.83849          .        .       .            .           .
                             |
      c.repmean#c.peopleideo |   .8346062          .        .       .            .           .
                             |
                   fossilper |  -35.22397          .        .       .            .           .
                    emission |  -.0000533   473194.7    -0.00   1.000    -927444.6    927444.6
                         gdp |   .0133302          .        .       .            .           .
                 unemploylag |  -75.70677          .        .       .            .           .
                  govideolag |   7.996532          .        .       .            .           .
                    ideodiff |   1.834573          .        .       .            .           .
                       price |   169.7478          .        .       .            .           .
                       1.dem |   205.6297          .        .       .            .           .
                     profess |    46.8682          .        .       .            .           .
      ----------------------------------------------------------------------------------------
      3. The xtlogit model. Data in each state is not dropped and coded as "0"

      Code:
      . xtlogit adoptrps c.repmean##c.peopleideo c.fossilper c.emission c.gdp c.unemploylag c.govideolag c.ideodiff c.price i.dem c.profess, nolog fe
      note: 19 groups (361 obs) omitted because of all positive or
            all negative outcomes.
      
      Conditional fixed-effects logistic regression        Number of obs    =    551
      Group variable: id                                   Number of groups =     29
      
                                                           Obs per group:
                                                                        min =     19
                                                                        avg =   19.0
                                                                        max =     19
      
                                                           LR chi2(12)      =  38.76
      Log likelihood = -66.007936                          Prob > chi2      = 0.0001
      
      ----------------------------------------------------------------------------------------
                    adoptrps | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      -----------------------+----------------------------------------------------------------
                     repmean |  -.4125622   .2522502    -1.64   0.102    -.9069636    .0818391
                  peopleideo |  -.2413848   .1792815    -1.35   0.178    -.5927701    .1100004
                             |
      c.repmean#c.peopleideo |    .007829    .003824     2.05   0.041     .0003341    .0153239
                             |
                   fossilper |    -.02222   .0481061    -0.46   0.644    -.1165061    .0720662
                    emission |   1.26e-07   7.37e-08     1.72   0.086    -1.81e-08    2.71e-07
                         gdp |  -2.26e-06   3.21e-06    -0.70   0.481    -8.55e-06    4.03e-06
                 unemploylag |  -.1852732   .1933301    -0.96   0.338    -.5641932    .1936468
                  govideolag |  -.0306272   .0259252    -1.18   0.237    -.0814397    .0201853
                    ideodiff |  -.0056636   .0266978    -0.21   0.832    -.0579904    .0466632
                       price |   -.225059   .1565869    -1.44   0.151    -.5319637    .0818457
                       1.dem |   1.401893   .8119022     1.73   0.084    -.1894065    2.993192
                     profess |  -.9835737   .5055017    -1.95   0.052    -1.974339    .0071914
      ----------------------------------------------------------------------------------------
      Last edited by Sukjae Lee; 15 Mar 2022, 22:20.

      Comment


      • #4
        Code:
        "Arizona"  1990 0
        "Arizona"  1991 0
        "Arizona"  1992 0
        "Arizona"  1993 0
        "Arizona"  1994 0
        "Arizona"  1995 0
        "Arizona"  1996 0
        "Arizona"  1997 0
        "Arizona"  1998 0
        "Arizona"  1999 0
        "Arizona"  2000 0
        "Arizona"  2001 0
        "Arizona"  2002 0
        "Arizona"  2003 0
        "Arizona"  2004 0
        "Arizona"  2005 0
        "Arizona"  2006 1
        "Arizona"  2007 0
        "Arizona"  2008 0
        "Arizona"  2009 0
        "Arizona"  2010 0
        "Arizona"  2011 0
        "Arizona"  2012 0
        "Arizona"  2013 0
        "Arizona"  2014 0
        "Arizona"  2015 0
        "Arkansas" 1990 0
        "Arkansas" 1991 0
        "Arkansas" 1992 0
        "Arkansas" 1993 0
        "Arkansas" 1994 0
        "Arkansas" 1995 0
        "Arkansas" 1996 0
        "Arkansas" 1997 0
        "Arkansas" 1998 0
        "Arkansas" 1999 0
        "Arkansas" 2000 0
        "Arkansas" 2001 0
        "Arkansas" 2002 0
        "Arkansas" 2003 0
        "Arkansas" 2004 0
        "Arkansas" 2005 0
        "Arkansas" 2006 0
        "Arkansas" 2007 0
        "Arkansas" 2008 0
        "Arkansas" 2009 0
        "Arkansas" 2010 0
        "Arkansas" 2011 0
        end

        Comment


        • #5
          Sukyae:
          your code #3 looks more convincing than the previous ones.
          Check it with the literature in your research field, though.
          Last edited by Carlo Lazzaro; 16 Mar 2022, 02:39.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment

          Working...
          X