Announcement

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

  • "xttest0" after "xtivreg, re ec2sls"

    Dear all,

    My name is Josep Rialp.

    I'm using "xtivreg, re ec2sls" and I would like to check if random effects estimations are more convenient than a pooled approach (when I implement "xtivreg, fe" the F test to compare fixed effects versus the pooled option is provided directly).

    I'm trying to run "xttest0" command but the comment that I receive is the folllowing:

    "last estimates not found"

    I also obtain this message when I run "estimates store random" after running "xtivreg, re ec2sls".

    I wonder if someone has some advice or suggestion for me.

    Thank all of you in advance for your attention.

    Josep

  • #2
    Josep:
    welcome to this forum.
    If your code does not include -fvvarlist- notation, you can check what is the best specification for your panel regression model via the community-contributed command -xtoverid- (just type -search xtoverid- to spot and install it):
    Code:
    . use https://www.stata-press.com/data/r16/nlswork
    (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
    
    . xi: xtivreg ln_w age not_smsa (tenure = union birth south), re ec2sls
    
    EC2SLS random-effects IV regression             Number of obs     =     19,007
    Group variable: idcode                          Number of groups  =      4,134
    
    R-sq:                                           Obs per group:
         within  = 0.0893                                         min =          1
         between = 0.2276                                         avg =        4.6
         overall = 0.1651                                         max =         12
    
                                                    Wald chi2(3)      =    2358.86
    corr(u_i, X)       = 0 (assumed)                Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------
         ln_wage |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          tenure |   .0617952   .0024766    24.95   0.000     .0569412    .0666492
             age |  -.0023111   .0008107    -2.85   0.004    -.0039001   -.0007221
        not_smsa |  -.2252714   .0081015   -27.81   0.000      -.24115   -.2093928
           _cons |   1.650852   .0192063    85.95   0.000     1.613208    1.688495
    -------------+----------------------------------------------------------------
         sigma_u |    .328017
         sigma_e |  .64359089
             rho |  .20619825   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    Instrumented:   tenure
    Instruments:    age not_smsa union birth_yr south
    ------------------------------------------------------------------------------
    
    . xtoverid
    
    Test of overidentifying restrictions:
    Cross-section time-series model: xtivreg ec2sls  
    Sargan-Hansen statistic 679.160  Chi-sq(7)    P-value = 0.0000
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you very much Carlo!!!

      Comment


      • #4
        Originally posted by Carlo Lazzaro View Post
        Josep:
        welcome to this forum.
        If your code does not include -fvvarlist- notation, you can check what is the best specification for your panel regression model via the community-contributed command -xtoverid- (just type -search xtoverid- to spot and install it):
        Code:
        . use https://www.stata-press.com/data/r16/nlswork
        (National Longitudinal Survey. Young Women 14-26 years of age in 1968)
        
        . xi: xtivreg ln_w age not_smsa (tenure = union birth south), re ec2sls
        
        EC2SLS random-effects IV regression Number of obs = 19,007
        Group variable: idcode Number of groups = 4,134
        
        R-sq: Obs per group:
        within = 0.0893 min = 1
        between = 0.2276 avg = 4.6
        overall = 0.1651 max = 12
        
        Wald chi2(3) = 2358.86
        corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
        
        ------------------------------------------------------------------------------
        ln_wage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        tenure | .0617952 .0024766 24.95 0.000 .0569412 .0666492
        age | -.0023111 .0008107 -2.85 0.004 -.0039001 -.0007221
        not_smsa | -.2252714 .0081015 -27.81 0.000 -.24115 -.2093928
        _cons | 1.650852 .0192063 85.95 0.000 1.613208 1.688495
        -------------+----------------------------------------------------------------
        sigma_u | .328017
        sigma_e | .64359089
        rho | .20619825 (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        Instrumented: tenure
        Instruments: age not_smsa union birth_yr south
        ------------------------------------------------------------------------------
        
        . xtoverid
        
        Test of overidentifying restrictions:
        Cross-section time-series model: xtivreg ec2sls
        Sargan-Hansen statistic 679.160 Chi-sq(7) P-value = 0.0000
        
        .
        Hi Mr. Carlo, what does significant P-value for Sargan Hansen statistic means for overidentification?

        Comment


        • #5
          Vivek:
          a rejecton of the null
          ...casts doubt on the validity of the instruments.
          (quoted from the help file of the community-contributed module -xtoverid-).

          As an aside, please call me Carlo, just like all on (and many more off) this list do. Thanks.
          Last edited by Carlo Lazzaro; 16 Oct 2020, 10:27.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Originally posted by Carlo Lazzaro View Post
            Vivek:
            a rejecton of the null (quoted from the help file of the community-contributed module -xtoverid-).

            As an aside, please call me Carlo, just like all on (and many more off) this list do. Thanks.
            Hi Carlo. Thanks.

            Is there any endogeneity or other postestimation tests for Xtivreg Random effect in state?

            Comment


            • #7
              stata*

              Comment

              Working...
              X