Announcement

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

  • #16
    Originally posted by Carlo Lazzaro View Post
    Guest:
    do you mean something along the following toy-example?
    Code:
    . use "http://www.stata-press.com/data/r14/nlswork.dta", clear
    (National Longitudinal Survey. Young Women 14-26 years of age in 1968)
    
    . xtreg ln_wage i.race grade
    
    Random-effects GLS regression Number of obs = 28,532
    Group variable: idcode Number of groups = 4,709
    
    R-sq: Obs per group:
    within = 0.0000 min = 1
    between = 0.3170 avg = 6.1
    overall = 0.1970 max = 15
    
    Wald chi2(3) = 2188.49
    corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
    
    ------------------------------------------------------------------------------
    ln_wage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    race |
    black | -.0459478 .0113042 -4.06 0.000 -.0681036 -.0237919
    other | .1039604 .0467629 2.22 0.026 .0123068 .195614
    |
    grade | .0909639 .0020131 45.19 0.000 .0870184 .0949094
    _cons | .5143082 .0267741 19.21 0.000 .4618319 .5667845
    -------------+----------------------------------------------------------------
    sigma_u | .30393641
    sigma_e | .32028665
    rho | .473825 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    . estimates store RE
    
    . xtreg ln_wage i.race grade, fe
    note: 2.race omitted because of collinearity
    note: 3.race omitted because of collinearity
    note: grade omitted because of collinearity
    
    Fixed-effects (within) regression Number of obs = 28,532
    Group variable: idcode Number of groups = 4,709
    
    R-sq: Obs per group:
    within = 0.0000 min = 1
    between = 0.0032 avg = 6.1
    overall = . max = 15
    
    F(0,23823) = 0.00
    corr(u_i, Xb) = . Prob > F = .
    
    ------------------------------------------------------------------------------
    ln_wage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    race |
    black | 0 (omitted)
    other | 0 (omitted)
    |
    grade | 0 (omitted)
    _cons | 1.674906 .0018962 883.32 0.000 1.67119 1.678623
    -------------+----------------------------------------------------------------
    sigma_u | .42462341
    sigma_e | .32028665
    rho | .63737122 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(4708, 23823) = 8.44 Prob > F = 0.0000
    
    . estimates table FE RE, b(%7.3f) stats(N r2) se
    
    --------------------------------------
    Variable | FE RE
    -------------+------------------------
    race |
    black | (omitted) -0.046
    | 0.011
    other | (omitted) 0.104
    | 0.047
    |
    grade | (omitted) 0.091
    | 0.002
    _cons | 1.675 0.514
    | 0.002 0.027
    -------------+------------------------
    N | 28532 28532
    r2 | 0.000
    --------------------------------------
    legend: b/se
    I mean that the Result of the different Steps of the regression look like this (below) but with standard errors and the other important values I have to concern in the Interpretation

    Code:
     estimates table step1 step2 step3 step4 step5 step6 step7, b(%7.4f) stats(N r2) star varlabel
    
    ---------------------------------------------------------------------------------------------------------------------
                    Variable |   step1        step2        step3        step4        step5        step6        step7    
    -------------------------+-------------------------------------------------------------------------------------------
                  transition |
              1 Veränderung  | -0.0856**    -0.0838**    -0.0838**    -0.0913**    -0.0827**    -0.0458      -0.0178    
    Ankerperson: Depressiv~b |              -0.1243***   -0.1219***   -0.1212***   -0.1207***   -0.0548**    -0.0403*    
    Ankerperson: Selbstwer~e |              -0.0024      -0.0028      -0.0032      -0.0014       0.0005       0.0030    
    Finanzielle Situation ~  |                            0.0138       0.0131       0.0103       0.0080      -0.0012    
    Zufriedenheit mit fina~S |                            0.0076       0.0074       0.0085       0.0093*      0.0089*    
                             |
                        move |
                      Umzug  |                                         0.1188**     0.1141**     0.0948**     0.0989**  
    Arbeitsstunden pro Woc~  |                                                     -0.0028***   -0.0013*     -0.0006    
    Emotionale Wärme in de~n |                                                                   0.2107***    0.1898***  
    Monitoring in der Erzi~t |                                                                   0.1764***    0.1547***  
    Negative Kommunikation~r |                                                                  -0.1194***   -0.1359***  
    Inkonsistente Erziehun~p |                                                                  -0.0432*     -0.0470**  
    Kind: Emotionale Wärme~r |                                                                   0.0765***    0.0622***  
    Kind: Monitoring in de~n |                                                                   0.0258**     0.0246**  
                  Age anchor |                                                                               -0.0167    
    Alter des Kindes in Ja~n |                                                                               -0.0128    
    Number of all kids liv~a |                                                                                0.0268    
                             |
                  stepparent |
            Stiefelternteil  |                                                                                0.0000    
                    Constant |  3.7777***    4.0070***    3.9201***    3.9216***    3.9905***    2.1446***    3.1505***  
    -------------------------+-------------------------------------------------------------------------------------------
                           N |    4015         4015         4015         4015         4015         4015         4015    
                          r2 |  0.0030       0.0157       0.0169       0.0194       0.0250       0.2241       0.2404    
    ---------------------------------------------------------------------------------------------------------------------
                                                                                 legend: * p<0.05; ** p<0.01; *** p<0.001
    Last edited by sladmin; 28 Jan 2019, 09:16. Reason: anonymize original poster

    Comment


    • #17
      Guest:
      Code:
      use "http://www.stata-press.com/data/r14/nlswork.dta", clear
      quietly xtreg ln_wage age
      estimates store F1
      quietly xtreg ln_wage age i.race
      estimates store F2
      quietly xtreg ln_wage age, re
      estimates store R1
      quietly xtreg ln_wage age i.race, re
      estimates store R2
      estimates table F1 F2 R1 R2, b(%7.3f) stats(N r2) varlabel se
      
      ------------------------------------------------------------------
                      Variable |   F1        F2        R1        R2    
      -------------------------+----------------------------------------
           age in current year |   0.019     0.019     0.019     0.019
                               |   0.000     0.000     0.000     0.000
                          race |                                      
                        black  |            -0.121              -0.121
                               |             0.013               0.013
                        other  |             0.098               0.098
                               |             0.054               0.054
                      Constant |   1.120     1.154     1.120     1.154
                               |   0.011     0.012     0.011     0.012
      -------------------------+----------------------------------------
                             N |   28510     28510     28510     28510
                            r2 |                                      
      ------------------------------------------------------------------
                                                                 legend: b/se
      estimates table F1 F2 R1 R2, b(%7.3f) stats(N r2) star varlabel se
      option star may not be combined with se, t, or p
      r(198);
      Two remarks:
      -r2 is left unreported because there are different Rsq for pnel data regression;
      -as per the previous error message, -star- and -se- options cannot live together. Hence, it's up to you to choose which one to report.
      Last edited by sladmin; 28 Jan 2019, 09:17. Reason: anonymize original poster
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #18
        Which version of Stata are you using?

        Comment


        • #19
          Originally posted by Jesse Wursten View Post
          Which version of Stata are you using?
          14.0 !

          Comment


          • #20
            Originally posted by Guest View Post

            14.0 !
            If you update to 14.2, the xtistest command should work.
            Last edited by sladmin; 28 Jan 2019, 09:17. Reason: anonymize original poster

            Comment

            Working...
            X