Announcement

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

  • Coefficient Sign Comparison estimating xtlogit with fe over two different time periods.

    Dear all,

    I'm analysing my data using a xtlogit with fe. Due to a numeric overflow I had to split up my sample into two time periods.
    I perform my main analyses with the current time period. In the robustness analyses, I now want to compare the results of estimating the same model over the two different time periods. Can differences in the sign of the coefficients of the two models be interpreted without problems?

    Best regards,

    Gerald


  • #2
    Gerald:
    the short and unhelpful reply is: who knows?
    A hopefully more positive reply would point you out to -suest- and related machinery:
    Code:
    use "https://www.stata-press.com/data/r17/nlswork.dta"
    . xtlogit nev_mar age if ttl_exp<=3 , fe
    note: multiple positive outcomes within groups encountered.
    note: 2,885 groups (7,012 obs) omitted because of all positive or
          all negative outcomes.
    
    Iteration 0:   log likelihood = -294.82606  
    Iteration 1:   log likelihood =  -89.40527  
    Iteration 2:   log likelihood = -88.665102  
    Iteration 3:   log likelihood = -88.642853  
    Iteration 4:   log likelihood = -88.642841  
    Iteration 5:   log likelihood = -88.642841  
    
    Conditional fixed-effects logistic regression       Number of obs    =   1,798
    Group variable: idcode                              Number of groups =     530
    
                                                        Obs per group:
                                                                     min =       2
                                                                     avg =     3.4
                                                                     max =       8
    
                                                        LR chi2(1)       = 1149.98
    Log likelihood = -88.642841                         Prob > chi2      =  0.0000
    
    ------------------------------------------------------------------------------
         nev_mar | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |  -2.708979   .2012287   -13.46   0.000     -3.10338   -2.314578
    ------------------------------------------------------------------------------
    
    . estimates store fe_1
    
    . xtlogit nev_mar age if ttl_exp>3 , fe
    note: multiple positive outcomes within groups encountered.
    note: 3,354 groups (16,084 obs) omitted because of all positive or
          all negative outcomes.
    
    Iteration 0:   log likelihood = -617.67747  
    Iteration 1:   log likelihood = -287.03369  
    Iteration 2:   log likelihood = -281.76776  
    Iteration 3:   log likelihood = -281.72409  
    Iteration 4:   log likelihood = -281.72407  
    
    Conditional fixed-effects logistic regression       Number of obs    =   3,600
    Group variable: idcode                              Number of groups =     517
    
                                                        Obs per group:
                                                                     min =       2
                                                                     avg =     7.0
                                                                     max =      14
    
                                                        LR chi2(1)       = 2219.23
    Log likelihood = -281.72407                         Prob > chi2      =  0.0000
    
    ------------------------------------------------------------------------------
         nev_mar | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |  -1.098613   .0543286   -20.22   0.000    -1.205095   -.9921305
    ------------------------------------------------------------------------------
    
    . estimates store fe_2
    
    . suest fe_1 fe_2
    
    Simultaneous results for fe_1, fe_2                      Number of obs = 5,398
    
                                 (Std. err. adjusted for 1,044 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
                 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
    fe_1_nev_mar |
             age |  -2.708979   .7093092    -3.82   0.000      -4.0992   -1.318759
    -------------+----------------------------------------------------------------
    fe_2_nev_mar |
             age |  -1.098613   .1906396    -5.76   0.000    -1.472259   -.7249658
    ------------------------------------------------------------------------------
    
    . test [fe_1_nev_mar = fe_2_nev_mar], cons
    
     ( 1)  [fe_1_nev_mar]age - [fe_2_nev_mar]age = 0
    
               chi2(  1) =    4.81
             Prob > chi2 =    0.0284
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hello Carlo,

      thank you for your fast reply. I tried to follow your approach with the following Code.

      Code:
      xtlogit NEWSiT SIZEiT INTERiT MTBViT ROAiT if Year<=2018, fe
      estimates store fe_1 
      xtlogit NEWSiT SIZEiT INTERiT MTBViT ROAiT if Year>2018, fe 
      estimates store fe_2 
      suest fe_1 fe_2
      But I always receive the following Error Code:
      Code:
      time-series operators not allowed
      r(101);
      Is this due to the
      Code:
      if Year>2018
      ?

      Best Regards,

      Gerald

      Comment


      • #4
        Gerald:
        could you please provide and excerpt f your data via -dataex-? Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hello Carlo,


          Code:
          * Example generated by -dataex-. To install: ssc install dataex
          clear
          input int Date str12 ISIN float(Year NEWSiT) double(MTBViT ROAiT INTERiT LEViT VOLAiT) byte(CEOiT FREEiT) float(SIZEiT NumISIN)
          20454 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20455 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20456 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20457 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20458 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20459 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20460 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20461 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20462 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20463 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20464 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20465 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20466 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20467 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20468 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20469 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20470 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20471 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20472 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20473 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20474 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20475 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20476 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20477 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20478 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20479 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20480 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20481 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20482 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20483 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20484 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20485 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20486 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20487 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20488 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20489 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20490 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20491 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20492 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20493 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20494 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20495 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20496 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20497 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20498 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20499 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20500 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20501 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20502 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20503 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20504 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20505 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20506 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20507 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20508 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20509 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20510 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20511 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20512 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20513 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20514 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20515 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20516 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20517 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20518 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20519 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20520 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20521 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20522 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20523 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20524 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20525 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20526 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20527 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20528 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20529 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20530 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20531 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20532 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20533 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20534 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20535 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20536 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20537 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20538 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20539 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20540 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20541 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20542 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20543 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20544 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20545 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20546 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20547 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20548 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20549 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20550 "AN8068571086" 2016 1 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20551 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20552 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          20553 "AN8068571086" 2016 0 2.46 3.34 71.02 27.94 23.51 1 100 11.380897 1
          end
          format %tdnn/dd/CCYY Date
          Best Regards,

          Gerald

          Comment


          • #6
            Gerald:
            there's no variation in your excerpt (that is formally perfect, though).
            Therefore, -xtlogit- cannot do its job.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Hello Carlo,

              yes there's no variation in it since
              Code:
              SIZEiT INTERiT MTBViT ROAiT
              are yearly controlls but
              Code:
              NEWSiT
              is on a daily basis. So the excerpt is basically just to short...

              Anyway I was able so solve the issue. The Error occured because I was in addition using a Lagged Variable such as
              Code:
              L.SIZEiT
              . When I reconstructed
              Code:
              L.SIZEiT
              "by hand" the error disappeared.

              I really appreciate your comments.

              Best regards,

              Gerald

              Comment

              Working...
              X