Announcement

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

  • Hausman test for the cases of-----> i.Category

    Dear community members

    The xtlogit with fe is producing singularity. How do I know which model is appropriate, given that can't perform Hausman test. May anyone suggest a way out?

    Code:
    . xtlogit Positive_score1 i.Student_Caste_New i.T_jati_new    attendence_percent i.T_nature i.course1 semester   i.T_gender      
    > ,  re
    
    Fitting comparison model:
    
    Iteration 0:   log likelihood = -6916.3047  
    Iteration 1:   log likelihood = -6227.3535  
    Iteration 2:   log likelihood = -6223.3065  
    Iteration 3:   log likelihood = -6223.3052  
    Iteration 4:   log likelihood = -6223.3052  
    
    Fitting full model:
    
    tau =  0.0     log likelihood = -6223.3052
    tau =  0.1     log likelihood = -6205.3286
    tau =  0.2     log likelihood = -6215.0659
    
    Iteration 0:   log likelihood = -6205.3286  
    Iteration 1:   log likelihood = -6204.9602  
    Iteration 2:   log likelihood =   -6204.96  
    
    Random-effects logistic regression                   Number of obs    = 10,091
    Group variable: collegerollno                        Number of groups =    669
    
    Random effects u_i ~ Gaussian                        Obs per group:
                                                                      min =      3
                                                                      avg =   15.1
                                                                      max =     16
    
    Integration method: mvaghermite                      Integration pts. =     12
    
                                                         Wald chi2(14)    = 910.59
    Log likelihood = -6204.96                            Prob > chi2      = 0.0000
    
    ------------------------------------------------------------------------------------
       Positive_score1 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------------+----------------------------------------------------------------
     Student_Caste_New |
                SC/ST  |  -.1490578   .0669102    -2.23   0.026    -.2801994   -.0179163
                  OBC  |  -.1016576   .0681051    -1.49   0.136    -.2351412    .0318259
                       |
            T_jati_new |
                    2  |  -.0628621   .0654247    -0.96   0.337    -.1910922    .0653681
                    3  |   .0206409   .0692384     0.30   0.766     -.115064    .1563457
                       |
    attendence_percent |   .0108409   .0013488     8.04   0.000     .0081973    .0134845
            2.T_nature |  -.0030631   .0540264    -0.06   0.955     -.108953    .1028267
                       |
               course1 |
                  eco  |   .9048065   .0888302    10.19   0.000     .7307025    1.078911
                  eng  |  -.3349528   .0972555    -3.44   0.001    -.5255701   -.1443354
                hindi  |   1.290587   .1006605    12.82   0.000     1.093296    1.487878
              history  |   .3157114   .1174965     2.69   0.007     .0854225    .5460003
                maths  |   .6986293   .0925691     7.55   0.000     .5171973    .8800614
                  pol  |   2.036058   .0943254    21.59   0.000     1.851184    2.220933
                       |
              semester |   .0823136   .0192908     4.27   0.000     .0445044    .1201228
            2.T_gender |   .2276783   .0720022     3.16   0.002     .0865565       .3688
                 _cons |  -1.448744   .1504831    -9.63   0.000    -1.743686   -1.153803
    -------------------+----------------------------------------------------------------
              /lnsig2u |  -2.117038   .2086743                     -2.526033   -1.708044
    -------------------+----------------------------------------------------------------
               sigma_u |   .3469692   .0362018                      .2827997    .4256992
                   rho |   .0353016   .0071065                      .0237328    .0522084
    ------------------------------------------------------------------------------------
    LR test of rho=0: chibar2(01) = 36.69                  Prob >= chibar2 = 0.000
    
    . xtlogit Positive_score1 i.Student_Caste_New i.T_jati_new    attendence_percent i.T_nature i.course1 semester   i.T_gender      
    > ,  fe
    note: multiple positive outcomes within groups encountered.
    note: 8 groups (122 obs) omitted because of all positive or
          all negative outcomes.
    note: 2.Student_Caste_New omitted because of no within-group variance.
    note: 3.Student_Caste_New omitted because of no within-group variance.
    note: 2.course1 omitted because of no within-group variance.
    note: 3.course1 omitted because of no within-group variance.
    note: 4.course1 omitted because of no within-group variance.
    note: 5.course1 omitted because of no within-group variance.
    note: 6.course1 omitted because of no within-group variance.
    note: 7.course1 omitted because of no within-group variance.
    
    Iteration 0:   log likelihood = -4796.8683  
    Iteration 1:   log likelihood = -4781.9886  
    Iteration 2:   log likelihood = -4781.9698  
    Iteration 3:   log likelihood = -4781.9698  
    
    Conditional fixed-effects logistic regression        Number of obs    =  9,969
    Group variable: collegerollno                        Number of groups =    661
    
                                                         Obs per group:
                                                                      min =      3
                                                                      avg =   15.1
                                                                      max =     16
    
                                                         LR chi2(6)       =  51.67
    Log likelihood = -4781.9698                          Prob > chi2      = 0.0000
    
    ------------------------------------------------------------------------------------
       Positive_score1 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------------+----------------------------------------------------------------
     Student_Caste_New |
                SC/ST  |          0  (omitted)
                  OBC  |          0  (omitted)
                       |
            T_jati_new |
                    2  |  -.0534922   .0658445    -0.81   0.417    -.1825452    .0755607
                    3  |   .0108931    .070487     0.15   0.877    -.1272589    .1490451
                       |
    attendence_percent |   .0110619   .0017746     6.23   0.000     .0075838      .01454
            2.T_nature |   .0140017   .0547203     0.26   0.798    -.0932482    .1212516
                       |
               course1 |
                  eco  |          0  (omitted)
                  eng  |          0  (omitted)
                hindi  |          0  (omitted)
              history  |          0  (omitted)
                maths  |          0  (omitted)
                  pol  |          0  (omitted)
                       |
              semester |   .0865461   .0209006     4.14   0.000     .0455818    .1275105
            2.T_gender |   .2040773   .0723231     2.82   0.005     .0623267    .3458278
    ------------------------------------------------------------------------------------
    Data--- I have repeated scores of the same student in various exams that he took in different papers and semesters.

    I am stuck, and not able to know, which model (fe re or me) is appropriate for my data.

    How do I conduct Hausman test for the produced results (shown in code)

  • #2
    Looks like most of your Xs are unchanging within the FE. Is it supposed to be that way?

    Comment


    • #3
      Sir, am I doing something wrong?. Before I ran these two regressions, I did xtset unique_student_ID .
      Last edited by ajay pasi; 10 Jan 2023, 13:50.

      Comment


      • #4
        does SC/BT vary within a student ID?

        Comment


        • #5
          Ajay:
          as an aside to George's helpful guidance, I'm under the impression that -course1- is a time-invariant variable either, and that you have multiple scores per student measured on the same course at different points in time.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            The data is a natural college data. George student has fixed social group (i.e., SC/ST OBC UR).

            Carlo, you are right course1 (i.e., majoring course) is time invariant, multiple scores per student as they took many papers, in which they took tests.
            ​​
            Last edited by ajay pasi; 10 Jan 2023, 15:00.

            Comment


            • #7
              You might look at this article and try the REWB model.

              HTML Code:
              https://journals.sagepub.com/doi/pdf/10.1177/1536867X1301300105
              Also, you can proceed with Hausman test even if you get the ommissions on the time invariant variables.
              Last edited by George Ford; 10 Jan 2023, 15:02.

              Comment


              • #8
                Thanks George, I am reading article to try REWB model.

                Comment


                • #9
                  One more thing, George. For applying REWB, is it conditional on Hausman test?

                  Comment


                  • #10
                    I can recall prof. Wooldridge has also suggested in one of the statalist post, for use of REWB in a somewhat similar case as that of me.

                    Comment


                    • #11
                      Although it is not mentioned in the reference cited in #7, the author of that article has co-written a Stata program -xthybrid- which implements the hybrid and correlated random-effects analyses. It is available from SSC.
                      Last edited by Clyde Schechter; 10 Jan 2023, 16:07.

                      Comment


                      • #12
                        REWB is not conditional on Hausman test. One of its advantages.

                        Comment


                        • #13
                          Thanks George, Clyde, and Carlo, sirs for valuable guidance.

                          Comment


                          • #14
                            Hello sirs, with reference to our previous interaction xthybrid related conversation

                            May I get any suggestion in this---https://www.statalist.org/forums/forum/general-stata-discussion/general/1696787-about-general-use-of-xthybrid-with-reference-to-an-unclearly-presented-previous-question


                            regards,
                            ajay

                            Comment


                            • #15
                              After reading and wondering, I have come to the conclusion of asking this,

                              In Schunck (2013) "The within-cluster effects are statistically different from the between-cluster effects, as can be seen from the small p-values in the formal tests of the random-effects assumption of orthogonality between the observables and the unobservables ( b[B age]= b[W age] p-value: 0.0004 and b[B msp]= b[W msp] p-value: 0.0000). This constitutes evidence in favor of rejecting such an assumption as well as using a standard random-effects model" (p.102). What if the highlighted p-value is not significant? Does this mean one can go for the standard random effect model? or stick to xthybrid?


                              reference
                              Schunck, R. (2013). Within and between estimates in random-effects models: Advantages and drawbacks of correlated random effects and hybrid models. The Stata Journal, 13(1), 65-76.

                              regards,
                              ajay

                              Comment

                              Working...
                              X