Announcement

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

  • Urgent help - xtoprobit panel regression

    I am using stata 13 and and regressing xtoprobit for a three round panel. the result gives me that the number of observations just equal to the number of groups. Is there posibility to have same observation and group numbers in a panel data? How can I correct it? . Sigma2_u is also almost zero implying there is no variation over time and I applied oprobit regression as a solution. the result still revealed that the pseudo R-square is very low (below ten percent) and the number of observations I obtained are equal to the number of groups (3143). where I made wrong? I couldnt identify it. Anyone to help me out please?

  • #2
    Abebe:
    please share what you typed and what Stata gave you back (via CODE delimiters, please) and/or post an excerpt/example of your dataset via -dataex-.
    Eventually, crying for help/urgent matters, usually reduces your chances of getting an helpful reply: all listers are busy people trying to deal with (too) many engagements and the Stata forum is not intended as a customer service..
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      dear Carlo Lazzaro thanks for your valuable comment.
      I run the the random effect ordered probit model (xtoprobit) . and the results are partially shown below. how can I correct this problem

      xtset hh_id hh_saq13_c
      panel variable: hh_id (strongly balanced)
      time variable: hh_saq13_c, 2004 to 2008, but with gaps
      delta: 1 unit

      Random-effects ordered probit regression Number of obs = 3143
      Group variable: hh_id Number of groups = 3143

      Random effects u_i ~ Gaussian Obs per group: min = 1
      avg = 1.0
      max = 1

      Integration method: mvaghermite Integration points = 12

      Wald chi2(36) = 813.03
      Log pseudolikelihood = -3875.6153 Prob > chi2 = 0.0000

      (Std. Err. adjusted for 3143 clusters in hh_id)
      ----------------------------------------------------------------------------------
      | Robust
      povcategory | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -----------------+----------------------------------------------------------------
      hh_s1q03 | -.0309128 .0667902 -0.46 0.643 -.1618192 .0999935
      hh_s1q04_a | -.0074715 .0080556 -0.93 0.354 -.0232601 .0083171
      _Imaried_1 | .221124 .0593326 3.73 0.000 .1048343 .3374138
      _Ieduchead_1 | .2819786 .0575425 4.90 0.000 .1691974 .3947597
      _Ieduchead_2 | .4326263 .0678121 6.38 0.000 .299717 .5655357
      _Ieduchead_3 | .3255298 .1559916 2.09 0.037 .0197918 .6312677
      _Ieduchead_4 | .6564651 .139211 4.72 0.000 .3836165 .9293137
      _Ieduchead_5 | .4756074 .4164513 1.14 0.253 -.340622 1.291837
      adeqfamsize | -.1608969 .0161005 -9.99 0.000 -.1924533 -.1293406
      depratio | -.4610711 .09085 -5.08 0.000 -.6391339 -.2830083
      agesquare | .000062 .0000793 0.78 0.434 -.0000934 .0002174
      femmembers | -.0091839 .0198162 -0.46 0.643 -.048023 .0296551
      TLU | .0200844 .0064792 3.10 0.002 .0073854 .0327833
      percapitaland | .0029209 .0022646 1.29 0.197 -.0015177 .0073595
      deathhhmem | .2151211 .109719 1.96 0.050 .0000757 .4301664
      illnesshhmem | -.103488 .0581217 -1.78 0.075 -.2174043 .0104284
      drought | -.1006613 .0569744 -1.77 0.077 -.2123291 .0110064
      flood | -.4234966 .1072483 -3.95 0.000 -.6336994 -.2132938
      ....................
      .................
      -----------------+----------------------------------------------------------------
      /cut1 | -2.204827 .206864 -10.66 0.000 -2.610273 -1.799381
      /cut2 | -1.29916 .2059173 -6.31 0.000 -1.702751 -.8955698
      /cut3 | -.401736 .2046614 -1.96 0.050 -.8028651 -.000607
      -----------------+----------------------------------------------------------------
      /sigma2_u | 9.93e-24 3.51e-23 9.84e-27 1.00e-20
      ----------------------------------------------------------------------------------



      Comment


      • #4
        If you only have observations in 2004, 2006, and 2008 you should add the delta option to your xtset command. See the output of help xtset for instructions.

        Comment


        • #5
          thanks William. I will check that and write the feedback

          Comment


          • #6
            Abebe:
            please use CODE delimiters in sharing Stata codes and output obtained with William's helpful fix.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              dear William, I have applied the delta option and the extset command brought the following result. but the xtoprobit result still remained the same. neither the observations nor the significance of Sigma2_u are changed. even all the new coefficients are the same to the previous output. What else can I do to correct the model appreciating your comments guys?


              xtset hh_id hh_saq13_c, delta(2)
              panel variable: hh_id (strongly balanced)
              time variable: hh_saq13_c, 2004 to 2008
              delta: 2 units

              Comment


              • #8
                Sorry Carlo, I failed to Send the stata results through the CODE delimiters. Can you give me a hint on how to use it?. I apologize for getting you back in to such preliminary tasks. it is because I am not that much experienced in stata.

                Comment


                • #9
                  Code:
                  The #-shaped button in the Advanced editor toolbar gives you access to CODE delimiters. When enetered between the tags of CODE delimiters, your Stata codes/output/tables will look like this
                  Last edited by Carlo Lazzaro; 01 Jun 2018, 05:21.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    Thanks Carlo. this is my xtoprobit result random effect model. waiting for your suggestions please!!
                    I thank you in advance

                    Code:
                    Random-effects ordered probit regression        Number of obs      =      3143
                    Group variable: hh_id                           Number of groups   =      3143
                    
                    Random effects u_i ~ Gaussian                   Obs per group: min =         1
                                                                                   avg =       1.0
                                                                                   max =         1
                    
                    Integration method: mvaghermite                 Integration points =        12
                    
                                                                    Wald chi2(36)      =    813.03
                    Log pseudolikelihood  = -3875.6153              Prob > chi2        =    0.0000
                    
                                                       (Std. Err. adjusted for 3143 clusters in hh_id)
                    Code:
                    ----------------------------------------------------------------------------------
                                     |               Robust
                         povcategory |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                    -----------------+----------------------------------------------------------------
                            hh_s1q03 |  -.0309128   .0667902    -0.46   0.643    -.1618192    .0999935
                          hh_s1q04_a |  -.0074715   .0080556    -0.93   0.354    -.0232601    .0083171
                          _Imaried_1 |    .221124   .0593326     3.73   0.000     .1048343    .3374138
                        _Ieduchead_1 |   .2819786   .0575425     4.90   0.000     .1691974    .3947597
                        _Ieduchead_2 |   .4326263   .0678121     6.38   0.000      .299717    .5655357
                        _Ieduchead_3 |   .3255298   .1559916     2.09   0.037     .0197918    .6312677
                        _Ieduchead_4 |   .6564651    .139211     4.72   0.000     .3836165    .9293137
                        _Ieduchead_5 |   .4756074   .4164513     1.14   0.253     -.340622    1.291837
                         adeqfamsize |  -.1608969   .0161005    -9.99   0.000    -.1924533   -.1293406
                            depratio |  -.4610711     .09085    -5.08   0.000    -.6391339   -.2830083
                           agesquare |    .000062   .0000793     0.78   0.434    -.0000934    .0002174
                          femmembers |  -.0091839   .0198162    -0.46   0.643     -.048023    .0296551
                                 TLU |   .0200844   .0064792     3.10   0.002     .0073854    .0327833
                       percapitaland |   .0029209   .0022646     1.29   0.197    -.0015177    .0073595
                          deathhhmem |   .2151211    .109719     1.96   0.050     .0000757    .4301664
                        illnesshhmem |   -.103488   .0581217    -1.78   0.075    -.2174043    .0104284
                             drought |  -.1006613   .0569744    -1.77   0.077    -.2123291    .0110064
                               flood |  -.4234966   .1072483    -3.95   0.000    -.6336994   -.2132938
                          cropdamage |  -.1066065   .0908098    -1.17   0.240    -.2845905    .0713774
                      Praisefooditem |   .0652509   .0497371     1.31   0.190     -.032232    .1627337
                      Incprice_input |   .2254308   .0652071     3.46   0.001     .0976272    .3532344
                      loss_livestock |  -.1438035   .0751706    -1.91   0.056    -.2911352    .0035282
                           hh_s12q02 |   .0000444   9.35e-06     4.75   0.000      .000026    .0000627
                        Ftransf_gift |  -.0000997   .0000996    -1.00   0.317     -.000295    .0000956
                         inkind_gift |   .0000751    .000088     0.85   0.394    -.0000974    .0002476
                          animalrent |   .0000607   .0000855     0.71   0.478     -.000107    .0002283
                            non_agri |  -.0000911   .0000762    -1.20   0.232    -.0002404    .0000582
                          hh_s11aq01 |   .1572737   .0877541     1.79   0.073    -.0147212    .3292686
                          hh_s11aq02 |   .1180775   .0870711     1.36   0.175    -.0525786    .2887337
                          hh_s11aq03 |   .1917233    .089442     2.14   0.032     .0164201    .3670264
                           hh_s14q01 |  -.0571671   .0480951    -1.19   0.235    -.1514317    .0370976
                            hh_s4q31 |  -.0646825   .0640756    -1.01   0.313    -.1902683    .0609034
                          _Iregion_3 |  -.8869998   .0740548   -11.98   0.000    -1.032145    -.741855
                          _Iregion_4 |    .083901   .0789604     1.06   0.288    -.0708584    .2386605
                          _Iregion_7 |  -.4403021   .0761376    -5.78   0.000    -.5895289   -.2910752
                          _Iregion_8 |    .030054   .0799873     0.38   0.707    -.1267182    .1868262
                    -----------------+----------------------------------------------------------------
                               /cut1 |  -2.204827    .206864   -10.66   0.000    -2.610273   -1.799381
                               /cut2 |   -1.29916   .2059173    -6.31   0.000    -1.702751   -.8955698
                               /cut3 |   -.401736   .2046614    -1.96   0.050    -.8028651    -.000607
                    -----------------+----------------------------------------------------------------
                           /sigma2_u |   9.93e-24   3.51e-23                      9.84e-27    1.00e-20
                    ----------------------------------------------------------------------------------
                    Last edited by Abebe Desta; 01 Jun 2018, 06:01.

                    Comment


                    • #11
                      thanks Carlo, this is my xtoprobit regression result after fixing the correction forwarded by William. Waiting your valuable comments please!!

                      Comment


                      • #12
                        Abebe:
                        you does not seem to have panel data, but one-wave data only (ie, one observation per panel).
                        Try -oprobit-, instead.
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          that is also my problem. Why the model considers only one wave while It contains three-waves data? could there be any technical mistake i commited? I realy have a panel of 3201 households for three rounds. what possible reasons could be there for the model to treat only one wave?

                          thanks calrlo
                          Last edited by Abebe Desta; 01 Jun 2018, 20:04.

                          Comment


                          • #14
                            I believe you have one or more variables that are present in only one wave and missing in the other two waves. Stata will omit observations with missing values. That would explain why xtlogit shows one onservation for each of 3143 (not 3201) households.

                            Comment


                            • #15
                              hello every one
                              thanks all for your propt resposes. william's comment was right. I corrected a variable with missed information for two waves. But i encountered another problem. When I try to compute 'xtoprobit' it gives 'cannot compute an improvement- discontinuous region encountered'. what could be the reason for this and how could i correct this?

                              Code:
                              xi: xtoprobit povcategory hh_s1q03 hh_s1q04_a i.maried i.educhead adeqfamsize depratio agesquare  TLU percapitaland deathhhmem illnesshhmem drought  cropdamage Praisefooditem loss_livestock hh_s12q02 ctransfer_gift hh_s11aq01 hh_s11aq02 hh_s11aq03  hh_s14q01 hh_s4q33 i.region, vce(robust)
                              i.maried          _Imaried_0-1        (naturally coded; _Imaried_0 omitted)
                              i.educhead        _Ieduchead_0-5      (naturally coded; _Ieduchead_0 omitted)
                              i.region          _Iregion_1-8        (naturally coded; _Iregion_1 omitted)
                              
                              Fitting comparison model:
                              
                              Iteration 0:   log likelihood = -13096.341  
                              Iteration 1:   log likelihood = -11987.016  
                              Iteration 2:   log likelihood = -11981.487  
                              Iteration 3:   log likelihood = -11981.438  
                              Iteration 4:   log likelihood = -11981.437  
                              
                              Refining starting values:
                              
                              Grid node 0:   log likelihood = -10048.616
                              
                              Fitting full model:
                              
                              Iteration 0:   log pseudolikelihood = -10048.616  
                              Iteration 1:   log pseudolikelihood = -6217.8365  
                              adaptive quadrature failed to converge
                              cannot compute an improvement -- discontinuous region encountered
                              r(430);

                              Comment

                              Working...
                              X