Announcement

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

  • #16
    Enrico:
    for the sake of precision, the same source (page 29) states that -vce(cluster clusterid)- standard errors "...allows arbitary correlations of disturbances within clusters as well as arbitrary heteroskedasticity across clusters."
    As expected, there's no difference between standard errors calculated via -newey- or -vce(cluster clusterid)- as we have -lag(0)- in (one wave) cross-sectional dataset:
    Code:
    ysuse auto.dta
    . g id=_n
    . g time=1
    
    . tsset id time
    
    Panel variable: id (strongly balanced)
     Time variable: time, 1 to 1
             Delta: 1 unit
    
    . newey price mpg, lag(0)
    
    Regression with Newey–West standard errors      Number of obs     =         74
    Maximum lag = 0                                 F(  1,        72) =      17.28
                                                    Prob > F          =     0.0001
    
    ------------------------------------------------------------------------------
                 |             Newey–West
           price | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             mpg |  -238.8943   57.47701    -4.16   0.000    -353.4727    -124.316
           _cons |   11253.06   1376.393     8.18   0.000     8509.272    13996.85
    ------------------------------------------------------------------------------
    
    . regress price mpg, vce(cluster id)
    
    Linear regression                               Number of obs     =         74
                                                    F(1, 73)          =      17.28
                                                    Prob > F          =     0.0001
                                                    R-squared         =     0.2196
                                                    Root MSE          =     2623.7
    
                                        (Std. err. adjusted for 74 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
           price | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             mpg |  -238.8943   57.47701    -4.16   0.000    -353.4459   -124.3428
           _cons |   11253.06   1376.393     8.18   0.000     8509.914    13996.21
    ------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #17

      I was also doubtful about the advantages of using xtreg but maybe there were some features that I did't know that could be useful. Thankyou for you suggestion for newey I will deepen the topic.

      Comment


      • #18
        Enrico:
        cross-sectional datasets have one wave of data only.
        This means that you do not have within panel variation, for instance (that is, what you usually investigate via -fe- specification) and that you have -insufficient observations- if you go -re-.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #19
          Hi Carlo excuse me if I take advantage of your availability. I was reading about the methods used to investigate functional form misspecification. I read on introductory econometrics by Wooldridge (p.306) about this test.
          I was surprised by the fact that I seem to have understood that in order to test for this possibility I should adding in my model the square and the cube of the linear prediction of the model. I was wondering why you in the #5 post included in the model the fitted values and its square and not the square and the cube of fitted values?

          Comment


          • #20
            Enrico:
            see -linktest- and, more substantively, do the two tests aimed at investigating possible misspecification of the functional form of the regressand produce opposite results?
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #21
              Thank you for you answer. I haven't checked for both tests yet. However I read on Microeconometrics Using Stata that in this case I should use as regressors only the fitted values and its square and omit the regressors used in the original model

              Comment


              • #22
                Enrico:
                correct.
                The -linktest- entry in Stata .pdf manual proposes something similar too.
                The substantive issue is that sq_fitted values reaching statistical significance mean that something is wrong with the right-hand side of your regressoon equation (even though the test formally focuses on the regressand; this is covered in the -linktest' entry mentioned above).
                Kind regards,
                Carlo
                (StataNow 18.5)

                Comment

                Working...
                X