Announcement

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

  • One-Sided Hypothesis Test of Coefficients Across Regressions

    I have searched extensively but have been unable to find any definitive guidance for whether, and how, I can test the INequality of coefficients across regressions.

    For example, I run the resgressions:

    reg y x1 x2 if Negative==1
    estimates store neg
    reg y x1 x2 if Negative==0
    estimates store pos

    Then I do:
    suest neg pos

    The test for x1 (in the negative partition) = x2 (in the positive partition) is:
    test [neg_mean]x1 = [pos_mean]x1

    But I am not sure how to test whether x1(neg)>x1(pos) or x1(neg)<x1(pos)

    The closest I can find (or at least I think it may be getting me close) came from http://www.stata.com/support/faqs/st...-coefficients/ but it is for coefficients within a regression, not across.

    Following the above, I could test x1(neg)>=x1(pos) by doing:

    local sign_negpos = sign([neg_mean]x1-[pos_mean]x1)
    display "H_: neg coef >= pos coef. p-value = " normal(`sign_negpos'*sqrt(r(chi2)))

    This gives me a p-value that is half of the p-value given by the equality hypothesis test, which makes me think the test may be good. However, I don't know if this is a valid test or if it is reliable. If it is a valid test, can I just divide the p-value for the equality Chi-square test in half as I typically would for directional hypotheses? And what to do about the Chi-squared coefficient...double it, or leave it?

    Thanks in advance!

  • #2
    With the same dv, you can easily run this as one model: reg y i.Negative##(x1 x2), robust . Use robust or clustered standard errors will take care of the fact that the two equation model allows different error variances in each subsample. After, issue the regress, coefl statement to see how to address the specific parameters. I don't vouch for the test you found, but it is certainly doable.

    Comment


    • #3
      I have an equation model where regrettably the solution proposed by Phil Bromiley does not work as I do not have the same dependent variable. However, the independent variables are the same. Therefore, I would like to ask whether anyone can comment on the solution illustrated by Amanda Beck - is it correct? I could not find any threads dealing with this topic on statalist and I neither found information on this issue in the help file of suest.

      Comment


      • #4
        What estimator are you using? For a good number of estimators, this should not be a problem as you can stack the dependent variables.

        Code:
        sysuse auto, clear
        *DVs -MPG AND TRUNK, SAME IVs
        regress mpg price weight turn disp
        regress trunk price weight turn disp
        *STACKED DV, SAME IVs
        rename (mpg trunk) (dv#), addnumber(1)
        reshape long dv, i(make) j(which)
        gen cons=1
        regress dv i.which#(c.price c.weight c.turn c.disp c.cons), robust nocons
        Res.:

        Code:
        . 
        . regress mpg price weight turn disp
        
              Source |       SS           df       MS      Number of obs   =        74
        -------------+----------------------------------   F(4, 69)        =     33.50
               Model |   1612.8459         4  403.211474   Prob > F        =    0.0000
            Residual |  830.613564        69  12.0378777   R-squared       =    0.6601
        -------------+----------------------------------   Adj R-squared   =    0.6404
               Total |  2443.45946        73  33.4720474   Root MSE        =    3.4696
        
        ------------------------------------------------------------------------------
                 mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               price |  -.0001613   .0001748    -0.92   0.359    -.0005099    .0001873
              weight |  -.0053449   .0015669    -3.41   0.001    -.0084707   -.0022191
                turn |  -.2011768   .1918837    -1.05   0.298    -.5839742    .1816206
        displacement |   .0060743   .0099301     0.61   0.543    -.0137356    .0258843
               _cons |   45.20834   5.270261     8.58   0.000     34.69445    55.72222
        ------------------------------------------------------------------------------
        
        . 
        . regress trunk price weight turn disp
        
              Source |       SS           df       MS      Number of obs   =        74
        -------------+----------------------------------   F(4, 69)        =     14.47
               Model |  609.349478         4   152.33737   Prob > F        =    0.0000
            Residual |  726.272143        69  10.5256832   R-squared       =    0.4562
        -------------+----------------------------------   Adj R-squared   =    0.4247
               Total |  1335.62162        73  18.2961866   Root MSE        =    3.2443
        
        ------------------------------------------------------------------------------
               trunk |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               price |  -.0000797   .0001634    -0.49   0.627    -.0004057    .0002463
              weight |   .0033992   .0014652     2.32   0.023     .0004763    .0063221
                turn |    .058655   .1794272     0.33   0.745    -.2992924    .4166024
        displacement |   .0016891   .0092854     0.18   0.856    -.0168349     .020213
               _cons |   1.325543   4.928132     0.27   0.789    -8.505811     11.1569
        ------------------------------------------------------------------------------
        
        . regress dv i.which#(c.price c.weight c.turn c.disp c.cons), robust nocons
        
        Linear regression                               Number of obs     =        148
                                                        F(10, 138)        =     680.69
                                                        Prob > F          =     0.0000
                                                        R-squared         =     0.9697
                                                        Root MSE          =     3.3588
        
        --------------------------------------------------------------------------------------
                             |               Robust
                          dv |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        ---------------------+----------------------------------------------------------------
               which#c.price |
                          1  |  -.0001613   .0001994    -0.81   0.420    -.0005556     .000233
                          2  |  -.0000797   .0001549    -0.51   0.608    -.0003861    .0002267
                             |
              which#c.weight |
                          1  |  -.0053449   .0015926    -3.36   0.001     -.008494   -.0021958
                          2  |   .0033992   .0013387     2.54   0.012     .0007521    .0060463
                             |
                which#c.turn |
                          1  |  -.2011768   .1680232    -1.20   0.233    -.5334096     .131056
                          2  |    .058655   .1643593     0.36   0.722    -.2663333    .3836433
                             |
        which#c.displacement |
                          1  |   .0060743   .0069262     0.88   0.382    -.0076208    .0197695
                          2  |   .0016891   .0059669     0.28   0.778    -.0101093    .0134875
                             |
                which#c.cons |
                          1  |   45.20834    4.22823    10.69   0.000     36.84785    53.56883
                          2  |   1.325543   4.167514     0.32   0.751    -6.914898    9.565985
        --------------------------------------------------------------------------------------

        Comment


        • #5
          Andrew Musau, thank you for your answer. I use the OLS estimator with cross-sectional and time fixed effects, SE need to be clustered cross-sectionally.

          I thought about your post a couple of days. Do you recommend to conduct one-tailed hypothesis tests based on your alternative approach with stacked dv or is it an illustration that the suest approach with the one-sided test proposed by Amanda Beck is valid?

          Comment


          • #6
            I would absorb the indicators, estimate the model and run the one-sided test. There is an example here (for a two-sided test) using reghdfe.

            Comment


            • #7
              Originally posted by Andrew Musau View Post
              I would absorb the indicators, estimate the model and run the one-sided test. There is an example here (for a two-sided test) using reghdfe.
              Thank you very much for your suggestion. Can you recommend a source (paper) for citing "stacked dependent variables"?
              Last edited by Samantha Robertson; 25 Apr 2020, 07:20.

              Comment


              • #8
                Using interactions to test the equality of coefficients from different regressions is well known, you don't need to cite any paper. If you want to illustrate the approach, you can provide a link to this Stata FAQ. However, if you insist on having some formal references, go to the manual entry of suest and look at the accompanying references.

                Comment


                • #9
                  Originally posted by Andrew Musau View Post
                  What estimator are you using? For a good number of estimators, this should not be a problem as you can stack the dependent variables.

                  Code:
                  sysuse auto, clear
                  *DVs -MPG AND TRUNK, SAME IVs
                  regress mpg price weight turn disp
                  regress trunk price weight turn disp
                  *STACKED DV, SAME IVs
                  rename (mpg trunk) (dv#), addnumber(1)
                  reshape long dv, i(make) j(which)
                  gen cons=1
                  regress dv i.which#(c.price c.weight c.turn c.disp c.cons), robust nocons
                  Res.:

                  Code:
                  .
                  . regress mpg price weight turn disp
                  
                  Source | SS df MS Number of obs = 74
                  -------------+---------------------------------- F(4, 69) = 33.50
                  Model | 1612.8459 4 403.211474 Prob > F = 0.0000
                  Residual | 830.613564 69 12.0378777 R-squared = 0.6601
                  -------------+---------------------------------- Adj R-squared = 0.6404
                  Total | 2443.45946 73 33.4720474 Root MSE = 3.4696
                  
                  ------------------------------------------------------------------------------
                  mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                  price | -.0001613 .0001748 -0.92 0.359 -.0005099 .0001873
                  weight | -.0053449 .0015669 -3.41 0.001 -.0084707 -.0022191
                  turn | -.2011768 .1918837 -1.05 0.298 -.5839742 .1816206
                  displacement | .0060743 .0099301 0.61 0.543 -.0137356 .0258843
                  _cons | 45.20834 5.270261 8.58 0.000 34.69445 55.72222
                  ------------------------------------------------------------------------------
                  
                  .
                  . regress trunk price weight turn disp
                  
                  Source | SS df MS Number of obs = 74
                  -------------+---------------------------------- F(4, 69) = 14.47
                  Model | 609.349478 4 152.33737 Prob > F = 0.0000
                  Residual | 726.272143 69 10.5256832 R-squared = 0.4562
                  -------------+---------------------------------- Adj R-squared = 0.4247
                  Total | 1335.62162 73 18.2961866 Root MSE = 3.2443
                  
                  ------------------------------------------------------------------------------
                  trunk | Coef. Std. Err. t P>|t| [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                  price | -.0000797 .0001634 -0.49 0.627 -.0004057 .0002463
                  weight | .0033992 .0014652 2.32 0.023 .0004763 .0063221
                  turn | .058655 .1794272 0.33 0.745 -.2992924 .4166024
                  displacement | .0016891 .0092854 0.18 0.856 -.0168349 .020213
                  _cons | 1.325543 4.928132 0.27 0.789 -8.505811 11.1569
                  ------------------------------------------------------------------------------
                  
                  . regress dv i.which#(c.price c.weight c.turn c.disp c.cons), robust nocons
                  
                  Linear regression Number of obs = 148
                  F(10, 138) = 680.69
                  Prob > F = 0.0000
                  R-squared = 0.9697
                  Root MSE = 3.3588
                  
                  --------------------------------------------------------------------------------------
                  | Robust
                  dv | Coef. Std. Err. t P>|t| [95% Conf. Interval]
                  ---------------------+----------------------------------------------------------------
                  which#c.price |
                  1 | -.0001613 .0001994 -0.81 0.420 -.0005556 .000233
                  2 | -.0000797 .0001549 -0.51 0.608 -.0003861 .0002267
                  |
                  which#c.weight |
                  1 | -.0053449 .0015926 -3.36 0.001 -.008494 -.0021958
                  2 | .0033992 .0013387 2.54 0.012 .0007521 .0060463
                  |
                  which#c.turn |
                  1 | -.2011768 .1680232 -1.20 0.233 -.5334096 .131056
                  2 | .058655 .1643593 0.36 0.722 -.2663333 .3836433
                  |
                  which#c.displacement |
                  1 | .0060743 .0069262 0.88 0.382 -.0076208 .0197695
                  2 | .0016891 .0059669 0.28 0.778 -.0101093 .0134875
                  |
                  which#c.cons |
                  1 | 45.20834 4.22823 10.69 0.000 36.84785 53.56883
                  2 | 1.325543 4.167514 0.32 0.751 -6.914898 9.565985
                  --------------------------------------------------------------------------------------
                  Andrew Musau, thank you very much for your answers so far. I appreciate that you dedicate attention to my questions.

                  Reestimating the model with -suest-, I noted that the approach above does yield the same coefficients, but not the same standard errors as compared to -suest-:


                  Code:
                  sysuse auto, clear
                  regress mpg price weight turn disp
                     est sto mpg
                  regress trunk price weight turn disp
                     est sto trunk
                     gen id=_n
                     preserve
                  rename (mpg trunk) (dv#), addnumber(1)
                  reshape long dv, i(make) j(which)
                  gen cons=1
                  regress dv i.which#(c.price c.weight c.turn c.disp c.cons), robust nocons
                  restore
                     suest mpg trunk

                  Results:
                  Code:
                  . regress dv i.which#(c.price c.weight c.turn c.disp c.cons), robust nocons
                  
                  Linear regression                               Number of obs     =        148
                                                                  F(10, 138)        =     680.69
                                                                  Prob > F          =     0.0000
                                                                  R-squared         =     0.9697
                                                                  Root MSE          =     3.3588
                  
                  --------------------------------------------------------------------------------------
                                       |               Robust
                                    dv |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  ---------------------+----------------------------------------------------------------
                         which#c.price |
                                    1  |  -.0001613   .0001994    -0.81   0.420    -.0005556     .000233
                                    2  |  -.0000797   .0001549    -0.51   0.608    -.0003861    .0002267
                                       |
                        which#c.weight |
                                    1  |  -.0053449   .0015926    -3.36   0.001     -.008494   -.0021958
                                    2  |   .0033992   .0013387     2.54   0.012     .0007521    .0060463
                                       |
                          which#c.turn |
                                    1  |  -.2011768   .1680232    -1.20   0.233    -.5334096     .131056
                                    2  |    .058655   .1643593     0.36   0.722    -.2663333    .3836433
                                       |
                  which#c.displacement |
                                    1  |   .0060743   .0069262     0.88   0.382    -.0076208    .0197695
                                    2  |   .0016891   .0059669     0.28   0.778    -.0101093    .0134875
                                       |
                          which#c.cons |
                                    1  |   45.20834    4.22823    10.69   0.000     36.84785    53.56883
                                    2  |   1.325543   4.167514     0.32   0.751    -6.914898    9.565985
                  --------------------------------------------------------------------------------------
                  
                  . restore
                  
                  .    suest mpg trunk
                  
                  Simultaneous results for mpg, trunk
                  
                                                                  Number of obs     =         74
                  
                  ------------------------------------------------------------------------------
                               |               Robust
                               |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                  mpg_mean     |
                         price |  -.0001613   .0001939    -0.83   0.405    -.0005413    .0002187
                        weight |  -.0053449   .0015484    -3.45   0.001    -.0083797   -.0023101
                          turn |  -.2011768    .163355    -1.23   0.218    -.5213466     .118993
                  displacement |   .0060743   .0067338     0.90   0.367    -.0071236    .0192722
                         _cons |   45.20834   4.110756    11.00   0.000     37.15141    53.26527
                  -------------+----------------------------------------------------------------
                  mpg_lnvar    |
                         _cons |   2.488058   .2601647     9.56   0.000     1.978145    2.997972
                  -------------+----------------------------------------------------------------
                  trunk_mean   |
                         price |  -.0000797   .0001506    -0.53   0.597    -.0003749    .0002155
                        weight |   .0033992   .0013016     2.61   0.009     .0008482    .0059502
                          turn |    .058655   .1597929     0.37   0.714    -.2545333    .3718433
                  displacement |   .0016891   .0058011     0.29   0.771    -.0096809    .0130591
                         _cons |   1.325543   4.051728     0.33   0.744    -6.615697    9.266783
                  -------------+----------------------------------------------------------------
                  trunk_lnvar  |
                         _cons |   2.353818    .146388    16.08   0.000     2.066903    2.640733
                  ------------------------------------------------------------------------------
                  This thread for instance successfully replicates -suest- producing the same SE. However, it does not treat distinct dependent variables. The thread is referenced to in the helpfile of -reghdfe- since similar to -xtreg-, -reghdfe- cannot be used with -suest-.

                  Actually, I use panel data and OLS with company and year fixed effects, however in this case I also fail to replicate the same SE as obtained by -suest-:

                  Code:
                  webuse grunfeld, clear
                  preserve
                  rename (invest mvalue) var#, addnumber(1)
                  reshape long var, i(company year) j(group)
                  *GENERATE GROUP INDICATORS
                  gen group1= 1.group
                  gen group2= 2.group
                  count
                  reghdfe var c.group1#(c.kstock) c.group2#(c.kstock), a(company#c.group1 year#c.group1 company#c.group2 year#c.group2) cluster(company)
                  restore
                  reg invest kstock i.year i.company
                  est sto inv
                  reg mvalue kstock i.year i.company
                  est sto mvalue
                  suest inv mvalue, vce(cluster company)
                  Results:

                  Code:
                  . reghdfe var c.group1#(c.kstock) c.group2#(c.kstock), a(company#c.group1 year#c.group1 company#c.group2 year#c.group2) cluster(company)
                  (warning: no intercepts terms in absorb(); regression lacks constant term)
                  (MWFE estimator converged in 2 iterations)
                  
                  HDFE Linear regression                            Number of obs   =        400
                  Absorbing 4 HDFE groups                           F(   2,      9) =      25.14
                  Statistics robust to heteroskedasticity           Prob > F        =     0.0002
                                                                    R-squared       =     0.9750
                                                                    Adj R-squared   =     0.9704
                                                                    Within R-sq.    =     0.1315
                  Number of clusters (company) =         10         Root MSE        =   209.2292
                  
                                                      (Std. Err. adjusted for 10 clusters in company)
                  -----------------------------------------------------------------------------------
                                    |               Robust
                                var |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  ------------------+----------------------------------------------------------------
                  c.group1#c.kstock |   .4138018   .0652084     6.35   0.000     .2662902    .5613134
                                    |
                  c.group2#c.kstock |   .4747497   .1432107     3.32   0.009     .1507846    .7987148
                  -----------------------------------------------------------------------------------
                  
                  Absorbed degrees of freedom:
                  ----------------------------------------------------------+
                        Absorbed FE | Categories  - Redundant  = Num. Coefs |
                  ------------------+---------------------------------------|
                   company#c.group1 |        10           0          10    ?|
                      year#c.group1 |        20           0          20    ?|
                   company#c.group2 |        10           0          10    ?|
                      year#c.group2 |        20           0          20    ?|
                  ----------------------------------------------------------+
                  ? = number of redundant parameters may be higher
                  
                  . restore
                  
                  [...]
                  
                  . suest inv mvalue, vce(cluster company)
                  
                  Simultaneous results for inv, mvalue
                  
                                                                  Number of obs     =        200
                  
                                                 (Std. Err. adjusted for 10 clusters in company)
                  ------------------------------------------------------------------------------
                               |               Robust
                               |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                  inv_mean     |
                        kstock |   .4138018   .0600171     6.89   0.000     .2961704    .5314333
                               |
                          year |
                         1936  |   23.94048   14.97531     1.60   0.110    -5.410591    53.29155
                         1937  |    32.9483   23.39419     1.41   0.159    -12.90348    78.80008
                         1938  |  -27.09347   17.95333    -1.51   0.131    -62.28135    8.094413
                         1939  |  -30.79792   12.53001    -2.46   0.014     -55.3563   -6.239543
                         1940  |    .582574    11.9828     0.05   0.961    -22.90329    24.06843
                         1941  |   19.58359   21.70541     0.90   0.367    -22.95825    62.12542
                         1942  |  -8.639339   21.17857    -0.41   0.683    -50.14858     32.8699
                         1943  |  -17.56753   12.89003    -1.36   0.173    -42.83152    7.696468
                         1944  |  -13.75927   13.93412    -0.99   0.323    -41.06965    13.55111
                         1945  |  -13.52533   15.05536    -0.90   0.369    -43.03331    15.98264
                         1946  |   17.69853    28.9051     0.61   0.540    -38.95443     74.3515
                         1947  |  -27.24073   29.89367    -0.91   0.362    -85.83125     31.3498
                         1948  |  -37.43002   43.08973    -0.87   0.385    -121.8843     47.0243
                         1949  |  -66.76233   39.67792    -1.68   0.092    -144.5296    11.00496
                         1950  |   -63.2855   38.44327    -1.65   0.100    -138.6329    12.06193
                         1951  |  -23.90976   47.36039    -0.50   0.614    -116.7344    68.91489
                         1952  |   -23.9138   48.35029    -0.49   0.621    -118.6786    70.85103
                         1953  |  -5.126558   37.93999    -0.14   0.893    -79.48758    69.23446
                         1954  |  -40.10513   27.03375    -1.48   0.138     -93.0903    12.88004
                               |
                       company |
                            2  |  -51.23295   21.22086    -2.41   0.016    -92.82508   -9.640828
                            3  |  -402.9934   14.90076   -27.05   0.000    -432.1983   -373.7884
                            4  |  -303.7443   31.64044    -9.60   0.000    -365.7584   -241.7302
                            5  |  -479.3182   9.702971   -49.40   0.000    -498.3356   -460.3007
                            6  |  -327.4387   32.65833   -10.03   0.000    -391.4479   -263.4296
                            7  |  -422.4257   20.01512   -21.11   0.000    -461.6546   -383.1968
                            8  |  -332.2429   33.77735    -9.84   0.000    -398.4453   -266.0405
                            9  |   -421.079   21.03811   -20.02   0.000    -462.3129    -379.845
                           10  |  -339.0705   38.56062    -8.79   0.000    -414.6479   -263.4931
                               |
                         _cons |   354.9166   33.14159    10.71   0.000     289.9603    419.8729
                  -------------+----------------------------------------------------------------
                  inv_lnvar    |
                         _cons |   8.246158   .3865163    21.33   0.000       7.4886    9.003716
                  -------------+----------------------------------------------------------------
                  mvalue_mean  |
                        kstock |   .4747497   .1318097     3.60   0.000     .2164075    .7330919
                               |
                          year |
                         1936  |   366.4578   158.4004     2.31   0.021     55.99868    676.9169
                         1937  |   625.5599   252.8791     2.47   0.013     129.9259    1121.194
                         1938  |   103.0697   112.6605     0.91   0.360    -117.7408    323.8802
                         1939  |   328.5231   134.3198     2.45   0.014      65.2611     591.785
                         1940  |   380.7274   157.3323     2.42   0.016     72.36177     689.093
                         1941  |   326.1077   147.0757     2.22   0.027     37.84466    614.3708
                         1942  |   106.1918   89.67622     1.18   0.236     -69.5704    281.9539
                         1943  |   215.8596   96.33376     2.24   0.025     27.04888    404.6703
                         1944  |     249.24   114.2719     2.18   0.029     25.27117    473.2088
                         1945  |    358.131   158.8193     2.25   0.024     46.85098    669.4111
                         1946  |   415.1337   166.1214     2.50   0.012      89.5418    740.7256
                         1947  |   103.2275   76.52114     1.35   0.177    -46.75121    253.2061
                         1948  |   53.40396   98.60533     0.54   0.588    -139.8589    246.6669
                         1949  |   57.19508   72.68035     0.79   0.431    -85.25579    199.6459
                         1950  |   107.1275   92.03212     1.16   0.244    -73.25212    287.5071
                         1951  |   327.6631   121.8553     2.69   0.007     88.83117    566.4951
                         1952  |   345.9053   124.9009     2.77   0.006     101.1041    590.7065
                         1953  |    531.716   208.1757     2.55   0.011     123.6992    939.7329
                         1954  |   453.8139   189.0861     2.40   0.016     83.21194    824.4159
                               |
                       company |
                            2  |  -2194.158   46.60527   -47.08   0.000    -2285.503   -2102.813
                            3  |  -2274.652   32.72505   -69.51   0.000    -2338.791   -2210.512
                            4  |  -3390.352   69.48875   -48.79   0.000    -3526.547   -3254.156
                            5  |  -4025.622   21.30967  -188.91   0.000    -4067.388   -3983.856
                            6  |  -3655.645   71.72424   -50.97   0.000    -3796.222   -3515.068
                            7  |  -4025.731   43.95721   -91.58   0.000    -4111.885   -3939.576
                            8  |  -3395.748   74.18183   -45.78   0.000    -3541.142   -3250.355
                            9  |  -3833.779   46.20391   -82.98   0.000    -3924.337   -3743.221
                           10  |    -3957.9   84.68686   -46.74   0.000    -4123.884   -3791.917
                               |
                         _cons |   3753.248   138.8191    27.04   0.000     3481.167    4025.329
                  -------------+----------------------------------------------------------------
                  mvalue_lnvar |
                         _cons |   11.32931   .4597212    24.64   0.000     10.42828    12.23035
                  ------------------------------------------------------------------------------
                  I appreciate any help.

                  Comment


                  • #10
                    This thread for instance successfully replicates -suest- producing the same SE.
                    There are really no differences. Notice that suest reports z-statistics while regress reports t-statistics. Even in the link, if you are comparing the standard errors based on t/z, there will be slight differences.

                    Code:
                    . suest south smsa
                    
                    Simultaneous results for south, smsa
                    
                                                                    Number of obs     =      1,934
                    
                    ------------------------------------------------------------------------------
                                 |               Robust
                                 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    south_mean   |
                           hours |   .0623497   .0174432     3.57   0.000     .0281617    .0965378
                           _cons |   4.520583   .6599613     6.85   0.000     3.227082    5.814083
                    -------------+----------------------------------------------------------------
                    south_lnvar  |
                           _cons |   3.319082   .1435356    23.12   0.000     3.037758    3.600407
                    -------------+----------------------------------------------------------------
                    smsa_mean    |
                           hours |   .0953636   .0132806     7.18   0.000      .069334    .1213931
                           _cons |   4.861519   .4842914    10.04   0.000     3.912325    5.810713
                    -------------+----------------------------------------------------------------
                    smsa_lnvar   |
                           _cons |   3.534987   .0910825    38.81   0.000     3.356469    3.713506
                    ------------------------------------------------------------------------------
                    
                    . reg wage hours? n, cl(idcode)
                    
                    Linear regression                               Number of obs     =      2,516
                                                                    F(3, 1933)        =      40.81
                                                                    Prob > F          =     0.0000
                                                                    R-squared         =     0.0399
                                                                    Root MSE          =     5.6403
                    
                                                 (Std. Err. adjusted for 1,934 clusters in idcode)
                    ------------------------------------------------------------------------------
                                 |               Robust
                            wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                          hours1 |   .0953636   .0132886     7.18   0.000     .0693022     .121425
                          hours2 |   .0623497   .0174536     3.57   0.000     .0281198    .0965796
                               n |   .3409364   .6124145     0.56   0.578    -.8601261    1.541999
                           _cons |   4.179646   1.177889     3.55   0.000     1.869579    6.489713
                    ------------------------------------------------------------------------------

                    Comment

                    Working...
                    X