Announcement

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

  • #16
    ^Hi Carlo if you could please reply to ^ #15 I'd be really grateful. just want to crystal clear thanks.

    Comment


    • #17
      ^sorry reposted #16 in a panic.

      Comment


      • #18
        Prash:
        I keep replying along the same lines as the answer looks (to me, at any rate), the same.
        Provided that what you're keeping asking is well covered in -xtreg- entry of Stata .pdf manual:
        - if you use -robust- option in -regress- (regardless you have cross-sectional or panel data) your standard errors will accomodate for heteroskedasticity only. If you actually have panel data and you use -regress- but omit to cluster the standard errors on -panelid-, your results will be biased (ie, untrustworthy) ,as you consider all the observations as independent and neglect their panel structure. Hence, it is not that -robust- outperforms -cluster- if you use -regress- with panel data: -robust- is simply wrong;
        - if you use -robust- under -xtreg- your standard errors will take both heteroskedasticity and/or autocorrelation of the systematic error into account. Hence if your panel data are affected by heteroskedasticity only; serial correlation only; both heteroskedasticity and serial correlation, -robust- (or -cluster-) option will account for them.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #19
          Originally posted by Carlo Lazzaro View Post
          Prash:
          I keep replying along the same lines as the answer looks (to me, at any rate), the same.
          Provided that what you're keeping asking is well covered in -xtreg- entry of Stata .pdf manual:
          - if you use -robust- option in -regress- (regardless you have cross-sectional or panel data) your standard errors will accomodate for heteroskedasticity only. If you actually have panel data and you use -regress- but omit to cluster the standard errors on -panelid-, your results will be biased (ie, untrustworthy) ,as you consider all the observations as independent and neglect their panel structure. Hence, it is not that -robust- outperforms -cluster- if you use -regress- with panel data: -robust- is simply wrong;
          - if you use -robust- under -xtreg- your standard errors will take both heteroskedasticity and/or autocorrelation of the systematic error into account. Hence if your panel data are affected by heteroskedasticity only; serial correlation only; both heteroskedasticity and serial correlation, -robust- (or -cluster-) option will account for them.
          Hi there what If initally I am just using a pooled approach to the data so intentially assuming each obs is independant, can I justify using the robust on the -regress- on the panel then?


          But in very elementary terms if I just use the robust standard to show that I corrected for hetro, not anything deeper. Is it a very obvious flaw.


          what would be biased in terms of p value, t stat, coefficients?

          Or would it better not using the robust at all in my OLS. I have a very Large N and only 2 time periods. I do not want to use cluster.



          Thanks
          Last edited by Prathvajeeth Rajmohan; 03 Sep 2017, 07:45.

          Comment


          • #20
            Ok thanks Carlo phrased my last reply in hurry during the late hours so it wasnt really coherent.


            Originally posted by Carlo Lazzaro View Post
            Prash:
            I keep replying along the same lines as the answer looks (to me, at any rate), the same.
            Provided that what you're keeping asking is well covered in -xtreg- entry of Stata .pdf manual:
            - if you use -robust- option in -regress- (regardless you have cross-sectional or panel data) your standard errors will accomodate for heteroskedasticity only. If you actually have panel data and you use -regress- but omit to cluster the standard errors on -panelid-, your results will be biased (ie, untrustworthy) ,as you consider all the observations as independent and neglect their panel structure. Hence, it is not that -robust- outperforms -cluster- if you use -regress- with panel data: -robust- is simply wrong;
            .
            But what if in my initial OLS approach I am pooling the data (the panel is unbalanced) and so I do want the to consider the observations as independant, in this case to simply superficially solve for the hetroskedasticity would using -regress- (in the panel ) and robust be fine?

            I know "technically" its wrong but Im asking if its allowed and if it does the job of solving for hetro?

            thanks so much Carlo

            Comment


            • #21
              Prash:
              as you write, it's technically wrong.
              I'm not aware of any theoretical reason that makes it acceptable.
              Kind regards,
              Carlo
              (Stata 18.0 SE)

              Comment


              • #22
                Is it possible to use the 'robust' command when you are using xtreg and have <30 clusters? If not, is there something else you could use? I have heteroskedasticty and I have only 23 clusters and when I try to use robust after re, the Wald chi2 and Prob > chi2 is removed, whilst it is given when I do not use the robust command. Thank you.

                Comment


                • #23
                  Hannah:
                  welcome to this forum.
                  1) the omission of Wald chi2 statistic when you invoke non-default standard errors should not worry you (see -help j_robustsingular- for more details);
                  2) indeed 23 clusters are not enough to rely on clustered-robust standard errors (see http://cameron.econ.ucdavis.edu/rese...February.pdf);
                  3) you may want to give -bootstrap- standard errors a shot and compare them with their default counterparts.
                  Kind regards,
                  Carlo
                  (Stata 18.0 SE)

                  Comment


                  • #24
                    Thank you Carlo for the helpful advise. I only have 286 observations though so I don't seem to have enough observations to compute bootstrap standard errors. Thank you.

                    Comment


                    • #25
                      Hannah:
                      could you please provide what you typed (-xtset- included) and what Stata gave you back after -xtreg-? Thanks.
                      Kind regards,
                      Carlo
                      (Stata 18.0 SE)

                      Comment


                      • #26
                        Code:
                        encode Pump, gen(Pump1)
                        xtset Pump1 Month
                        xtreg lnmedian_daily_abs_pp i.Month i.Salinity_percent_group i.size_area_group abs_limits i.Pump1, re vce(bootstrap, nodots reps(200))
                        Code:
                        insufficient observations to compute bootstrap standard errors
                        no results will be saved
                        r(2000)

                        Comment


                        • #27
                          Hannah:
                          have you already tested that the functional form of your regressand is correctly specified?
                          In the following toy-example, the model is misspecified, as -test- on -sq_fitted- rejects the null:
                          Code:
                          . use "https://www.stata-press.com/data/r17/nlswork.dta"
                          (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
                          
                          . xtreg ln_wage c.age##c.age, re vce(cluster idcode)
                          
                          Random-effects GLS regression                   Number of obs     =     28,510
                          Group variable: idcode                          Number of groups  =      4,710
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.1087                                         min =          1
                               Between = 0.1015                                         avg =        6.1
                               Overall = 0.0870                                         max =         15
                          
                                                                          Wald chi2(2)      =    1258.33
                          corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
                          
                                                       (Std. err. adjusted for 4,710 clusters in idcode)
                          ------------------------------------------------------------------------------
                                       |               Robust
                               ln_wage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
                          -------------+----------------------------------------------------------------
                                   age |   .0590339   .0041049    14.38   0.000     .0509884    .0670795
                                       |
                           c.age#c.age |  -.0006758   .0000688    -9.83   0.000    -.0008107    -.000541
                                       |
                                 _cons |   .5479714   .0587198     9.33   0.000     .4328826    .6630601
                          -------------+----------------------------------------------------------------
                               sigma_u |   .3654049
                               sigma_e |  .30245467
                                   rho |  .59342665   (fraction of variance due to u_i)
                          ------------------------------------------------------------------------------
                          
                          . predict fitted, xb
                          
                          
                          . g sq_fitted=fitted^2
                          
                          
                          . xtreg ln_wage fitted sq_fitted , re vce(cluster idcode)
                          
                          Random-effects GLS regression                   Number of obs     =     28,510
                          Group variable: idcode                          Number of groups  =      4,710
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.1088                                         min =          1
                               Between = 0.1045                                         avg =        6.1
                               Overall = 0.0887                                         max =         15
                          
                                                                          Wald chi2(2)      =    1316.74
                          corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
                          
                                                       (Std. err. adjusted for 4,710 clusters in idcode)
                          ------------------------------------------------------------------------------
                                       |               Robust
                               ln_wage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
                          -------------+----------------------------------------------------------------
                                fitted |   2.805959   .6246598     4.49   0.000     1.581648    4.030269
                             sq_fitted |  -.5516341   .1920793    -2.87   0.004    -.9281026   -.1751656
                                 _cons |  -1.468083   .5055433    -2.90   0.004     -2.45893   -.4772365
                          -------------+----------------------------------------------------------------
                               sigma_u |  .36481589
                               sigma_e |  .30242516
                                   rho |  .59269507   (fraction of variance due to u_i)
                          ------------------------------------------------------------------------------
                          
                          . test sq_fitted
                          
                           ( 1)  sq_fitted = 0
                          
                                     chi2(  1) =    8.25
                                   Prob > chi2 =    0.0041
                          
                          .
                          Kind regards,
                          Carlo
                          (Stata 18.0 SE)

                          Comment

                          Working...
                          X