Announcement

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

  • Multiple fixed effects using areg

    Dear all,

    I am studying the determinants of peer group composition and use panel data with a sample period between 2006-2016.
    However, I'm facing an issue regarding the measurement of fixed effects.

    My dataset looks as following;
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long main_cik double year float(dropped rel_ROA_w isCompPeer main_CEO_turnover rel_at sic_dummy2 sic_dummy3 corrxy main_CEOduality)
    2488 2006 0  -.11691028 1 0   -2.679014 1 1         -1 0
    2488 2006 0  -.11691028 1 0   -2.679014 1 1         -1 0
    2488 2006 0  -.11691028 1 0   -2.679014 1 1         -1 0
    2488 2006 0  -.11691028 1 0   -2.679014 1 1         -1 0
    2488 2006 0  -.11691028 1 0   -2.679014 1 1         -1 0
    2488 2006 0   -.2020019 1 0  -.05955731 1 1         -1 0
    2488 2006 0   -.2020019 1 0  -.05955731 1 1         -1 0
    2488 2006 0   -.2020019 1 0  -.05955731 1 1         -1 0
    2488 2006 0   -.2020019 1 0  -.05955731 1 1         -1 0
    2488 2006 0   -.2020019 1 0  -.05955731 1 1         -1 0
    2488 2006 0 -.031219125 0 0    .8384784 1 1          1 0
    2488 2006 0 -.031219125 0 0    .8384784 1 1          1 0
    2488 2006 0 -.031219125 0 0    .8384784 1 1          1 0
    2488 2006 0 -.031219125 0 0    .8384784 1 1          1 0
    2488 2006 0 -.031219125 0 0    .8384784 1 1          1 0
    2969 2015 0 .0041524395 1 0    .5056937 0 0          1 1
    2969 2015 0 .0041524395 1 0    .5056937 0 0          1 1
    2969 2015 0 .0041524395 1 0    .5056937 0 0          1 1
    2969 2015 0 .0041524395 1 0    .5056937 0 0          1 1
    2969 2015 0 .0041524395 1 0    .5056937 0 0          1 1
    2969 2015 0   .02739468 1 0   -1.360693 1 0          1 1
    2969 2015 0   .02739468 1 0   -1.360693 1 0          1 1
    2969 2015 0   .02739468 1 0   -1.360693 1 0          1 1
    2969 2015 0   .02739468 1 0   -1.360693 1 0          1 1
    2969 2015 0   .02739468 1 0   -1.360693 1 0          1 1
    2969 2015 0  .019526236 1 0 -.069021285 1 0         -1 1
    2969 2015 0  .019526236 1 0 -.069021285 1 0         -1 1
    2969 2015 0  .019526236 1 0 -.069021285 1 0         -1 1
    2969 2015 0  .019526236 1 0 -.069021285 1 0         -1 1
    2969 2015 0  .019526236 1 0 -.069021285 1 0         -1 1
    2969 2015 0  -.04745034 1 0   .09800953 0 0          1 1
    2969 2015 0  -.04745034 1 0   .09800953 0 0          1 1
    2969 2015 0  -.04745034 1 0   .09800953 0 0          1 1
    2969 2015 0  -.04745034 1 0   .09800953 0 0          1 1
    2969 2015 0  -.04745034 1 0   .09800953 0 0          1 1
    2969 2015 0 -.009038955 1 0   .29493254 0 0          1 1
    2969 2015 0 -.009038955 1 0   .29493254 0 0          1 1
    2969 2015 0 -.009038955 1 0   .29493254 0 0          1 1
    2969 2015 0 -.009038955 1 0   .29493254 0 0          1 1
    2969 2015 0 -.009038955 1 0   .29493254 0 0          1 1
    2969 2015 0  .019391946 1 0  -1.7653357 0 0          1 1
    2969 2015 0  .019391946 1 0  -1.7653357 0 0          1 1
    2969 2015 0  .019391946 1 0  -1.7653357 0 0          1 1
    2969 2015 0  .019391946 1 0  -1.7653357 0 0          1 1
    2969 2015 0  .019391946 1 0  -1.7653357 0 0          1 1
    2969 2015 0 -.011165775 1 0  -.05051582 1 1          1 1
    2969 2015 0 -.011165775 1 0  -.05051582 1 1          1 1
    2969 2015 0 -.011165775 1 0  -.05051582 1 1          1 1
    2969 2015 0 -.011165775 1 0  -.05051582 1 1          1 1
    2969 2015 0 -.011165775 1 0  -.05051582 1 1          1 1
    2969 2015 0   .01896139 1 0   .10477632 1 0          1 1
    2969 2015 0   .01896139 1 0   .10477632 1 0          1 1
    2969 2015 0   .01896139 1 0   .10477632 1 0          1 1
    2969 2015 0   .01896139 1 0   .10477632 1 0          1 1
    2969 2015 0   .01896139 1 0   .10477632 1 0          1 1
    2969 2015 0  -.05593555 1 0     .632718 0 0          1 1
    2969 2015 0  -.05593555 1 0     .632718 0 0          1 1
    2969 2015 0  -.05593555 1 0     .632718 0 0          1 1
    2969 2015 0  -.05593555 1 0     .632718 0 0          1 1
    2969 2015 0  -.05593555 1 0     .632718 0 0          1 1
    4127 2014 0   .06216906 1 0  -1.3067086 1 1   .4036001 0
    4127 2014 0   .06216906 1 0  -1.3067086 1 1   .4036001 0
    4127 2014 0   .06216906 1 0  -1.3067086 1 1   .4036001 0
    4127 2014 0   .06216906 1 0  -1.3067086 1 1   .4036001 0
    4127 2014 0   .06216906 1 0  -1.3067086 1 1   .4036001 0
    4127 2015 0    .1159539 1 0   -.8987412 1 1   .4036001 0
    4127 2015 0    .1159539 1 0   -.8987412 1 1   .4036001 0
    4127 2015 0    .1159539 1 0   -.8987412 1 1   .4036001 0
    4127 2015 0    .1159539 1 0   -.8987412 1 1   .4036001 0
    4127 2015 0    .1159539 1 0   -.8987412 1 1   .4036001 0
    4127 2014 0   .14269203 1 0   .30691504 1 1          1 0
    4127 2014 0   .14269203 1 0   .30691504 1 1          1 0
    4127 2014 0   .14269203 1 0   .30691504 1 1          1 0
    4127 2014 0   .14269203 1 0   .30691504 1 1          1 0
    4127 2014 0   .14269203 1 0   .30691504 1 1          1 0
    4127 2015 0    .1801022 1 0    .3412647 1 1          1 0
    4127 2015 0    .1801022 1 0    .3412647 1 1          1 0
    4127 2015 0    .1801022 1 0    .3412647 1 1          1 0
    4127 2015 1    .1801022 1 0    .3412647 1 1          1 0
    4127 2015 0    .1801022 1 0    .3412647 1 1          1 0
    4127 2014 0   .02156958 1 0   -.6470728 1 1  -.9892372 0
    4127 2014 0   .02156958 1 0   -.6470728 1 1  -.9892372 0
    4127 2014 0   .02156958 1 0   -.6470728 1 1  -.9892372 0
    4127 2014 0   .02156958 1 0   -.6470728 1 1  -.9892372 0
    4127 2014 0   .02156958 1 0   -.6470728 1 1  -.9892372 0
    4127 2015 0   .10041837 1 0  -.29675594 1 1  -.9892372 0
    4127 2015 0   .10041837 1 0  -.29675594 1 1  -.9892372 0
    4127 2015 0   .10041837 1 0  -.29675594 1 1  -.9892372 0
    4127 2015 0   .10041837 1 0  -.29675594 1 1  -.9892372 0
    4127 2015 0   .10041837 1 0  -.29675594 1 1  -.9892372 0
    4127 2014 0  -.12391421 1 0    .4432786 1 1 -.04774367 0
    4127 2014 0  -.12391421 1 0    .4432786 1 1 -.04774367 0
    4127 2014 0  -.12391421 1 0    .4432786 1 1 -.04774367 0
    4127 2014 0  -.12391421 1 0    .4432786 1 1 -.04774367 0
    4127 2014 0  -.12391421 1 0    .4432786 1 1 -.04774367 0
    4127 2015 0  -.06187664 1 0    .4934455 1 1 -.04774367 0
    4127 2015 0  -.06187664 1 0    .4934455 1 1 -.04774367 0
    4127 2015 0  -.06187664 1 0    .4934455 1 1 -.04774367 0
    4127 2015 0  -.06187664 1 0    .4934455 1 1 -.04774367 0
    4127 2015 0  -.06187664 1 0    .4934455 1 1 -.04774367 0
    end


    I want to do a logistic regression using industry and year fixed effects (main_cik and year) and cluster by main_cik.
    I used the following formula:

    areg dropped rel_ROA_w isCompPeer main_CEO_turnover rel_at sic_dummy2 sic_dummy3 corrxy main_CEOduality main_abo_medStockOwn, a(main_cik) cluster(main_cik)

    The problem is that I can only include one fixed effect. Therefore, my question is: how can i include fixed effects for both year and main_cik?

    Thanks for the help.

    Best regards,

    Patrick.

  • #2
    I am not familiar with areg, but from a quick look at the help file it seems that it also only handles linear regression (not logistic as you are after). Is it possible to go down the easier route of just using logit? As so:

    Code:
     logit dv iv i.year i.main_cik, vce(cluster main_cik)
    Perhaps I am way off the mark here.

    Comment


    • #3
      Unconditional logit is biased (you can search for discussions relating to the incidental parameter problem). See clogit and xtlogit for conditional logit.

      Comment


      • #4
        I would second Andrew Musau suggestion that you should (probably) go for -clogit- or -xtlogit- as a matter of convenience.

        But in my view what Andrew is saying is not correct.

        In your case also

        logit y x i.industry i.year

        would be consistent.

        Why is that?

        The incidental parameters problem arises when your parameters are growing at the rate of your asymptotic dimension, so that information does not accumulate with new data.


        Example 1, incidental parameter problem present: you are assuming that the number of individuals is going to infinity, and you want to include individual level fixed effects.

        Example 2, incidental problem not present: you are assuming that the number of individuals is going to infinity, however your number of industries and number of years are staying fixed. You want to include industry and year fixed effects.

        Comment


        • #5
          In your case you would have incidental parameters problem if you were doing asymptotic in the industry or the time dimensions. That is, if you assume that your industries grow to infinity, or your years grow to infinity, or both, then you would have an incidental parameter problem if you just do

          logit y x i.industry i.year

          Comment


          • #6
            Joro Kolev, I had not checked how the panels were defined in #1 and assumed that the fixed effects were on the panel variable.

            ADDED IN EDIT: Looking at no. 1, it is the case that the variable main_cik defines panels, so this is a classic case where unconditional logit model would be biased and my comment in #3 is correct.
            Last edited by Andrew Musau; 10 Jan 2019, 04:52.

            Comment


            • #7
              Thank you all for answering me.

              I tried the following command:

              logit dropped rel_EPS proxycontest proxycontestXrel_EPS isCompPeer main_CEO_turnover rel_at sic_dummy2 sic_dummy3 corrxy main_CEOduality main_abo_medStockOwn, i.main_cik i.year vce(cluster main_cik)

              However, the following two errors occur multiple times:


              note: 1137774.main_cik != 0 predicts failure perfectly
              1137774.main_cik dropped and 60 obs not used

              note: 2016.year != 0 predicts failure perfectly
              2016.year dropped and 4890 obs not used

              How can I solve these errors?

              Comment


              • #8
                Patrick, try the -asis- option to -logit-, and read the manual ([R] logit) about the problem you are having.

                This is not that much of an "error" to be solved, but rather it is a data configuration issue. The error message is completely self explanatory: say when year is 2016, your dropped is always 0.

                Comment

                Working...
                X