Announcement

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

  • A problem about outputing the results of total, direct, and indirect effects after using a nonrecursive structural equation model

    Dear Stata users,

    I recently performed a nonrecursive structural equation model in Stata and obtained the results successfully. However, I'm having trouble exporting the total, direct, and indirect effects into a Word document. The command I use is "estat teffects".

    If any of you have experience with this or can offer any advice, I would be grateful for your help.

    Thank you for your time.

    Best regards,
    Mindy

  • #2
    This may help: https://www.statalist.org/forums/for...egress-to-word

    Comment


    • #3
      Dear Andrew Musau ,

      I would like to express my sincere gratitude for sharing your method with me. I have tried implementing it, and I have successfully obtained the desired results using your example. Your assistance has been immensely helpful.

      However, I encountered a challenge when applying the method to my specific model. Upon using the "return list" command, the results I obtained were different, and I couldn't find the variables r(b) and r(V) in the output:
      Code:
      .         return list
      
      scalars:
                 r(N_groups) =  1
      
      matrices:
                  r(V_total) :  184 x 184
                    r(total) :  1 x 184
               r(V_indirect) :  184 x 184
                 r(indirect) :  1 x 184
                 r(V_direct) :  184 x 184
                   r(direct) :  1 x 184
                     r(nobs) :  1 x 1
      Here is the code I used:
      Code:
      sem ($y1 <-  $y2 $x1 $x5 $x7) ($y2 <- $y1 $x2 $x6 $x7)($y3 <-  $y4 $y1 $y2 $x1 $x5 $x7) ($y4 <- $y3 $y1 $y2 $x2 $x6 $x7), cov(e.$y1*e.$y2) cov(e.$y3*e.$y4) nocapslatent 
          //Total effects, Indirect effects and direct effects
          estat teffects
          return list
          mat b= r(total) 
          mat V= r(V_total) 
          foreach eq in direct indirect total{
          gen  `eq'= runiformint(1,185)
          }
          gen zero=0
          local vars
          forval i=1/30{
          local vars "`vars' zero"
          }
          sureg (total `vars', nocons)
          erepost b= b, rename
          erepost V=V, rename
          esttab, mlabel(none) se unstack nonumbers
      And I met a problem:
      Code:
      .     erepost b= b, rename
      conformability error
      In light of this issue, I am seeking guidance on how to modify my command to obtain the desired output. It is worth mentioning that in my model, I have four equations, and they have a different number of explanatory variables. Specifically, two equations have 28 explanatory variables, while the other two have 30 explanatory variables. Could you kindly advise me on how to properly set the number in the loop to accommodate these variations?

      Thank you very much for your time and support. I greatly appreciate your expertise and guidance.

      Best regards,
      Mindy

      Comment


      • #4
        Dear Andrew Musau ,

        Thank you so much for your invaluable advice. I have identified the issue where I mistakenly set the wrong number in the loop, and as a result, I have successfully obtained the desired results. I cannot express enough gratitude for your assistance.

        Now, I am facing another challenge. Even after applying the structural equation model with standardization, the results I obtain are still the pre-standardization results. I would like to output the results after standardization. Could you please guide me on how to achieve this? Below is the code I have been using:

        Code:
        sem ($y1 <-  $y2 $x1 $x5 $x7) ($y2 <- $y1 $x2 $x6 $x7)($y3 <-  $y4 $y1 $y2 $x1 $x5 $x7) ($y4 <- $y3 $y1 $y2 $x2 $x6 $x7), cov(e.$y1*e.$y2) cov(e.$y3*e.$y4) nocapslatent standardized
        Once again, I deeply appreciate your generous support. Your expertise and willingness to assist have been immensely valuable to me. I eagerly look forward to your guidance on obtaining the standardized results.

        Best regards,
        Mindy

        Comment


        • #5
          Thanks. For something similar to the results table with stars, consider:

          Code:
          * Example generated by -dataex-. To install: ssc install dataex
          clear
          input float(LS_w LS_h SWB_w SWB_h Trust_w Trust2_w Trust3_w Trust_h Trust2_h Trust3_h) double Age_w float(Edu_year_w Ethnicity_w Health_w Pension_w) double Age_h float(Edu_year_h Ethnicity_h Pension_h Health_h Familysize Children_ratio Business Debt)
          4.3333335         5 4.1 4.1  3.333333 4.5 4.5 4.3333335   4 4.5 49 12 1 1 1 52 12 1 1 1 3         0 0 0
                  4 4.3333335 4.1 4.3  3.333333 2.5 3.5 4.3333335   4 4.5 27 16 1 1 1 29 16 1 1 0 2         0 0 1
           3.666667         5 4.8 4.8  3.333333   4   4         2   4   4 28 12 1 1 1 37 11 1 1 0 2  .3333333 0 0
           3.666667 4.3333335 3.8 4.8         4 4.5   4 4.3333335   5 4.5 25 16 1 0 1 27 16 1 1 1 4         0 0 1
                  5         5   5 4.1  3.333333   4   5  3.333333 4.5   5 52 12 1 1 1 51 15 1 1 1 4         0 0 1
          4.6666665 4.6666665 4.1 4.1         4   4   4         3   4   4 48 15 1 1 1 50 12 1 1 1 3         0 0 0
           2.666667         4   3 4.3  3.666667   3   4         4   4   4 42 12 1 1 1 44 12 1 1 1 3       .25 0 0
                  5         5   5 4.5  3.333333   4   5         4   4   4 50 12 1 0 1 53 15 1 1 1 3         0 0 0
                  5         5   5 4.5  3.333333   4   4  3.666667 4.5   5 45 12 1 1 1 58 12 1 1 1 6         0 0 0
          4.3333335         5   5 3.5  3.333333   4   4  2.666667 4.5   4 37 12 1 1 1 38 12 1 1 1 3         0 0 0
          4.6666665         5 4.3   3  3.333333 4.5 4.5         4 4.5 4.5 57 12 1 0 1 58 12 1 1 0 3         0 0 0
           3.666667         5 3.9 3.2         4 4.5   4  3.666667   4   4 30 15 1 1 1 32 15 1 1 1 5 .16666667 0 0
           3.666667         5   5 4.5  2.666667 4.5 4.5         4   4 4.5 44 15 1 1 1 49  9 1 1 1 5         0 0 0
           3.666667  3.666667 4.8   5         4   4   4         3 3.5   4 39 15 1 1 1 40 12 1 1 1 4        .2 0 0
          4.3333335         5 4.1 4.3  2.666667 4.5   5 4.6666665 4.5   5 34 15 1 1 1 35 15 1 1 1 4        .2 0 0
                  4         5 4.6 4.8         2   4   4 4.3333335   5 3.5 34 16 1 1 1 38 16 1 1 1 2  .3333333 0 1
                  3         5 4.1 4.1         3   4   4  3.333333   3   4 46 12 0 1 1 48 16 0 1 1 3         0 0 0
                  4         4 4.1   2  3.333333   3   4  3.333333 3.5 4.5 36  6 1 0 1 40  9 1 1 1 4  .3333333 0 0
                  4         5   5 4.5 4.3333335 4.5   5  3.666667   4   4 32  0 1 1 1 32  9 1 1 1 2        .5 1 0
                  3         5 4.1 3.9  3.666667   3 4.5  3.666667 4.5   4 30 16 1 1 1 34 16 1 1 0 2        .5 0 1
          1.6666666 4.6666665   3   5 4.3333335   4   3 4.6666665 4.5 4.5 39 12 1 1 1 43  7 1 1 1 2        .5 1 1
                  5         5   5   5         4 4.5 4.5         4 4.5   4 53  9 1 1 1 54 16 1 1 1 2         0 0 1
           3.666667         4 3.9 3.9         3   4   4         4   4 4.5 45 16 1 1 1 54 15 1 1 1 3         0 0 0
           3.666667         5 4.1   5         4   4   3  3.333333   4   4 37 16 1 1 1 38 15 1 1 1 2  .3333333 1 1
                  3         5 3.2 4.3 4.3333335 4.5   5         4   4   4 41 19 1 1 1 40 15 1 1 1 5         0 0 1
           3.666667         5 3.9 2.9         4 4.5   4         2   4   4 54 12 1 1 1 53 15 1 1 1 2         0 1 0
                  5 4.3333335 2.2 4.1         4   4   4  3.333333 4.5   5 42 16 1 1 1 48 15 1 1 1 2  .3333333 1 0
                  3         4 4.2   3         2   4   4         2   3   4 46 15 1 1 1 46 15 1 1 1 3         0 0 0
                  4 4.3333335 3.6 4.2 4.3333335   4   3  2.666667 3.5   3 35 12 1 1 0 38 12 0 1 1 2  .3333333 1 0
          4.3333335         4 4.1 3.6         4   4   4         4   4   4 41  9 1 1 1 46  9 1 1 1 3         0 1 1
                  4  3.666667 3.6   2         3   4   4  3.666667   4   4 35 15 1 1 1 36 15 1 1 1 3        .4 0 0
                  4         5 3.7   3         4   4 3.5  3.333333   4   5 47  6 1 1 0 52  9 1 1 1 2         0 1 1
          4.3333335         5 4.1   5  3.333333   4   4  2.666667   4   4 48 16 1 1 1 51  9 1 1 1 2         0 0 0
          4.6666665         5 4.1   5  2.666667   4   4         4   4 4.5 27 16 1 1 1 27 16 1 1 1 2         0 0 0
                  5         5 3.4 4.1  2.666667 3.5 4.5  3.333333   4   4 56  8 1 0 1 56  9 1 1 1 3         0 0 0
          4.6666665 4.3333335   5 3.9         2   4   4         4 4.5   4 40 16 1 1 1 38 16 1 1 1 3       .25 0 1
           3.666667         5 4.1   4         2   4 4.5  3.333333 3.5 3.5 43 12 1 1 1 45 12 1 1 1 3         0 0 1
                  5 4.3333335   5 4.2  3.666667   4   5  3.666667   4   4 55  9 1 0 0 53 12 1 1 1 3         0 0 1
          1.3333334         4 1.9   4         3   5   5         1 1.5   1 50  6 1 0 1 51  0 1 0 0 3       .25 0 0
           2.666667         5   3   3 4.3333335   5 4.5         4   4   4 52  9 1 0 1 51  8 1 0 1 3         0 0 1
          2.3333333         5   3   3 1.6666666 3.5 3.5 1.3333334   4   4 55  9 1 1 1 55  9 1 0 0 3         0 0 0
          1.3333334         5 4.1 4.1         4 4.5   5 2.3333333   4   4 44  9 1 1 1 44  9 1 0 1 5 .16666667 0 0
                  5         5 4.6   5         2   4   4  3.666667 4.5   4 37  9 1 1 1 38 12 1 1 1 3       .25 0 0
          4.3333335         4 4.1 3.4         3   4   4  3.333333   4   4 30 15 1 1 1 30 15 1 1 1 4  .3333333 0 1
           3.666667         5 4.1   5         4   5 4.5         4 4.5   4 53  9 1 0 1 52  0 1 1 1 6         0 0 1
           3.333333         5 3.7 4.1 1.3333334   4   3         4   3   5 54  9 1 1 1 54  9 1 1 1 7         0 0 0
                  4 4.3333335 4.1 4.6  3.666667   4 4.5         4   4 4.5 28 15 1 1 1 29 12 1 1 1 5  .2857143 0 0
                  5         4 3.6 4.1         3 3.5 3.5         4   4   4 42  9 1 1 1 43  9 1 0 0 3       .25 1 0
           3.666667         5 4.5   5  2.666667 4.5 4.5         3   3   3 38  6 1 1 1 40 15 1 1 1 5 .16666667 0 0
                  4  3.666667 3.7 4.1  3.666667 3.5 4.5         3   3   3 41 15 1 1 1 47 12 1 0 0 2  .3333333 1 1
          end
          label values Age_w age
          label values Age_h age
          
          global y1 LS_w
              global y2 LS_h
              global y3 SWB_w
              global y4 SWB_h
              global x1 Trust_w Trust2_w Trust3_w
              global x2 Trust_h Trust2_h Trust3_h
              global x3 Age_w Edu_year_w Ethnicity_w Health_w Pension_w Health_w 
              global x4 Age_h Edu_year_h Ethnicity_h  Health_w Pension_h Health_h
              global x5  Familysize Children_ratio  Business Debt 
             *I CURTAIL THE NO. OF ITERATIONS AS I AM JUST ILLUSTRATING TECHNIQUE  
             sem ($y1 <-  $y2 $x1 $x3 $x5) ($y2 <- $y1 $x2 $x4 $x5)($y3 <-  $y4 $y1 $y2 $x1 $x3 $x5) ($y4 <- $y3 $y1 $y2 $x2 $x4 $x5), ///
             cov(e.$y1*e.$y2) cov(e.$y3*e.$y4) nocapslatent standardized iterate(20) nolog
              estadd mat b_st= r(table)["b", 1...]
              estadd mat se_st= r(table)["se", 1...]
              estadd mat p_st= r(table)["pvalue", 1...]
              esttab, cells("b_st(star) se_st") p(p_st) starlevels(* 0.1 ** 0.05 *** 0.01) label ///
              nonumbers collab(Coef. SE, lhs(Variables))
          Res.:

          Code:
          .    *I CURTAIL THE NO. OF ITERATIONS AS I AM JUST ILLUSTRATING TECHNIQUE  
          .    sem ($y1 <-  $y2 $x1 $x3 $x5) ($y2 <- $y1 $x2 $x4 $x5)($y3 <-  $y4 $y1 $y2 $x1 $x3 $x5) ($y4 <- $y3 $y1 $y2 $x2 $x4 $x5), ///
          >    cov(e.$y1*e.$y2) cov(e.$y3*e.$y4) nocapslatent standardized iterate(20) nolog
          
          Endogenous variables
          
          Observed:  LS_w LS_h SWB_w SWB_h
          
          Exogenous variables
          
          Observed:  Trust_w Trust2_w Trust3_w Age_w Edu_year_w Ethnicity_w Health_w Pension_w Familysize Children_ratio Business Debt Trust_h
                     Trust2_h Trust3_h Age_h Edu_year_h Ethnicity_h Pension_h Health_h
          convergence not achieved
          
          Structural equation model                       Number of obs     =         50
          Estimation method  = ml
          Log likelihood     = -953.00081
          
          -------------------------------------------------------------------------------------
                              |                 OIM
                 Standardized |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          --------------------+----------------------------------------------------------------
          Structural          |
            LS_w              |
                         LS_h |   1.009953   .2346061     4.30   0.000     .5501338    1.469773
                      Trust_w |  -.3313821   .1777661    -1.86   0.062    -.6797972     .017033
                     Trust2_w |  -.4192148    .405344    -1.03   0.301    -1.213674    .3752448
                     Trust3_w |   .3978032   .1838001     2.16   0.030     .0375616    .7580449
                        Age_w |  -.2296086    .212886    -1.08   0.281    -.6468574    .1876403
                   Edu_year_w |   .1021706   .3725697     0.27   0.784    -.6280525    .8323937
                  Ethnicity_w |   .1556869   .1605037     0.97   0.332    -.1588946    .4702685
                     Health_w |  -.2387249   .2865192    -0.83   0.405    -.8002923    .3228425
                    Pension_w |  -.1325372   .2055096    -0.64   0.519    -.5353286    .2702543
                   Familysize |   .0085769   .2362815     0.04   0.971    -.4545264    .4716801
               Children_ratio |  -.1502032   .2214452    -0.68   0.498    -.5842278    .2838215
                     Business |   .5615699   .2953701     1.90   0.057    -.0173449    1.140485
                         Debt |   -.117186   .2201968    -0.53   0.595    -.5487637    .3143917
                        _cons |  -2.951638   .3597834    -8.20   0.000    -3.656801   -2.246476
            ------------------+----------------------------------------------------------------
            LS_h              |
                         LS_w |  -.2214619   .6076643    -0.36   0.716    -1.412462    .9695383
                     Health_w |   .0609303   .1370167     0.44   0.657    -.2076174    .3294781
                   Familysize |   .0096486   .1404336     0.07   0.945    -.2655962    .2848935
               Children_ratio |   -.296056   .1578451    -1.88   0.061    -.6054267    .0133146
                     Business |  -.0207819   .1799656    -0.12   0.908     -.373508    .3319443
                         Debt |  -.1125479   .1554002    -0.72   0.469    -.4171267    .1920309
                      Trust_h |    .015952   .1323138     0.12   0.904    -.2433783    .2752823
                     Trust2_h |   .4710699   .2601476     1.81   0.070      -.03881    .9809498
                     Trust3_h |  -.0915595   .1627565    -0.56   0.574    -.4105563    .2274372
                        Age_h |   .1159197   .1725456     0.67   0.502    -.2222634    .4541029
                   Edu_year_h |  -.0091518    .137993    -0.07   0.947    -.2796132    .2613095
                  Ethnicity_h |  -.0949503   .1319395    -0.72   0.472     -.353547    .1636465
                    Pension_h |   .2516495   .1599626     1.57   0.116    -.0618715    .5651705
                     Health_h |   .0009631   .1172808     0.01   0.993    -.2289029    .2308292
                        _cons |   7.453336   .7864925     9.48   0.000     5.911839    8.994833
            ------------------+----------------------------------------------------------------
            SWB_w             |
                         LS_w |   .5656112    .111932     5.05   0.000     .3462286    .7849938
                         LS_h |   .2162904    .201821     1.07   0.284    -.1792714    .6118523
                        SWB_h |  -.0708946   .3258502    -0.22   0.828    -.7095493    .5677601
                      Trust_w |   .0953484   .1327466     0.72   0.473      -.16483    .3555269
                     Trust2_w |   .0572644   .1444744     0.40   0.692    -.2259003    .3404291
                     Trust3_w |    .075877   .1358751     0.56   0.577    -.1904333    .3421873
                        Age_w |  -.1443707   .1484035    -0.97   0.331    -.4352363    .1464948
                   Edu_year_w |  -.2278452   .1791322    -1.27   0.203    -.5789379    .1232475
                  Ethnicity_w |   -.056593   .1194499    -0.47   0.636    -.2907106    .1775245
                     Health_w |   .3316282   .1673781     1.98   0.048     .0035732    .6596832
                    Pension_w |  -.0338484   .1224168    -0.28   0.782    -.2737809    .2060842
                   Familysize |   .0637285   .1273846     0.50   0.617    -.1859409    .3133978
               Children_ratio |   .0407367   .1433636     0.28   0.776    -.2402508    .3217241
                     Business |  -.3992411    .192452    -2.07   0.038    -.7764401   -.0220422
                         Debt |    .167144   .1172722     1.43   0.154    -.0627053    .3969933
                        _cons |   1.235715   .1198714    10.31   0.000     1.000771    1.470658
            ------------------+----------------------------------------------------------------
            SWB_h             |
                         LS_w |  -.1345691    .819081    -0.16   0.870    -1.739938      1.4708
                         LS_h |     .00437   .4837806     0.01   0.993    -.9438226    .9525626
                        SWB_w |   .2889209   1.330895     0.22   0.828    -2.319586    2.897428
                     Health_w |   .2582466   .3145667     0.82   0.412    -.3582927     .874786
                   Familysize |   .0142046   .1940445     0.07   0.942    -.3661157    .3945248
               Children_ratio |  -.1879232   .2323377    -0.81   0.419    -.6432967    .2674504
                     Business |   .0738629   .4581669     0.16   0.872    -.8241276    .9718535
                         Debt |  -.0923653   .2715063    -0.34   0.734    -.6245078    .4397772
                      Trust_h |   .3926569   .1815229     2.16   0.031     .0368786    .7484352
                     Trust2_h |   .2920772   .2362108     1.24   0.216    -.1708875    .7550419
                     Trust3_h |  -.5613457   .1918513    -2.93   0.003    -.9373674    -.185324
                        Age_h |  -.0835399   .2203976    -0.38   0.705    -.5155112    .3484315
                   Edu_year_h |  -.2585548   .1947699    -1.33   0.184    -.6402968    .1231872
                  Ethnicity_h |   -.037613   .1408687    -0.27   0.789    -.3137106    .2384845
                    Pension_h |   .1746767   .1969367     0.89   0.375    -.2113122    .5606656
                     Health_h |  -.0599908   .1808622    -0.33   0.740    -.4144742    .2944926
                        _cons |   4.873628   2.157287     2.26   0.024      .645424    9.101833
          --------------------+----------------------------------------------------------------
                   var(e.LS_w)|   1.515948    .495225                      .7991282    2.875756
                   var(e.LS_h)|   .6813143   .0938633                      .5200907    .8925157
                  var(e.SWB_w)|   .5249118   .1134978                      .3435875    .8019279
                  var(e.SWB_h)|   .7289291   .2684014                      .3542106    1.500061
          --------------------+----------------------------------------------------------------
            cov(e.LS_w,e.LS_h)|  -.6467363   .4597867    -1.41   0.160    -1.547902    .2544291
          cov(e.SWB_w,e.SWB_h)|  -.0444024   1.034903    -0.04   0.966    -2.072776    1.983971
          -------------------------------------------------------------------------------------
          Note: The LR test of model vs. saturated is not reported because the fitted
                model is not full rank.
          Warning: convergence not achieved
          
          .     estadd mat b_st= r(table)["b", 1...]
          
          added matrix:
                         e(b_st) :  1 x 68
          
          .     estadd mat se_st= r(table)["se", 1...]
          
          added matrix:
                        e(se_st) :  1 x 68
          
          .     estadd mat p_st= r(table)["pvalue", 1...]
          
          added matrix:
                         e(p_st) :  1 x 68
          
          .     esttab, cells("b_st(star) se_st") p(p_st) starlevels(* 0.1 ** 0.05 *** 0.01) label ///
          >     nonumbers collab(Coef. SE, lhs(Variables))
          
          -------------------------------------------------
                                                           
          Variables                   Coef.              SE
          -------------------------------------------------
          LS_w                                             
          LS_h                     1.009953***     .2346061
          Trust_w                 -.3313821*       .1777661
          Trust2_w                -.4192148         .405344
          Trust3_w                 .3978032*       .1838001
          Age_w                   -.2296086         .212886
          Edu_year_w               .1021706        .3725697
          Ethnicity_w              .1556869        .1605037
          Health_w                -.2387249        .2865192
          Pension_w               -.1325372        .2055096
          Familysize               .0085769        .2362815
          Children_ratio          -.1502032        .2214452
          Business                 .5615699*       .2953701
          Debt                     -.117186        .2201968
          Constant                -2.951638        .3597834
          -------------------------------------------------
          LS_h                                             
          LS_w                    -.2214619        .6076643
          Health_w                 .0609303        .1370167
          Familysize               .0096486        .1404336
          Children_ratio           -.296056*       .1578451
          Business                -.0207819        .1799656
          Debt                    -.1125479        .1554002
          Trust_h                   .015952        .1323138
          Trust2_h                 .4710699*       .2601476
          Trust3_h                -.0915595        .1627565
          Age_h                    .1159197        .1725456
          Edu_year_h              -.0091518         .137993
          Ethnicity_h             -.0949503        .1319395
          Pension_h                .2516495        .1599626
          Health_h                 .0009631        .1172808
          Constant                 7.453336        .7864925
          -------------------------------------------------
          SWB_w                                            
          LS_w                     .5656112***      .111932
          LS_h                     .2162904         .201821
          SWB_h                   -.0708946        .3258502
          Trust_w                  .0953484        .1327466
          Trust2_w                 .0572644        .1444744
          Trust3_w                  .075877        .1358751
          Age_w                   -.1443707        .1484035
          Edu_year_w              -.2278452        .1791322
          Ethnicity_w              -.056593        .1194499
          Health_w                 .3316282**      .1673781
          Pension_w               -.0338484        .1224168
          Familysize               .0637285        .1273846
          Children_ratio           .0407367        .1433636
          Business                -.3992411**       .192452
          Debt                      .167144        .1172722
          Constant                 1.235715        .1198714
          -------------------------------------------------
          SWB_h                                            
          LS_w                    -.1345691         .819081
          LS_h                       .00437        .4837806
          SWB_w                    .2889209        1.330895
          Health_w                 .2582466        .3145667
          Familysize               .0142046        .1940445
          Children_ratio          -.1879232        .2323377
          Business                 .0738629        .4581669
          Debt                    -.0923653        .2715063
          Trust_h                  .3926569**      .1815229
          Trust2_h                 .2920772        .2362108
          Trust3_h                -.5613457***     .1918513
          Age_h                   -.0835399        .2203976
          Edu_year_h              -.2585548        .1947699
          Ethnicity_h              -.037613        .1408687
          Pension_h                .1746767        .1969367
          Health_h                -.0599908        .1808622
          Constant                 4.873628**      2.157287
          -------------------------------------------------
          /                                                
          var(e.LS_w)              1.515948***      .495225
          var(e.LS_h)              .6813143***     .0938633
          var(e.SWB_w)             .5249118***     .1134978
          var(e.SWB_h)             .7289291**      .2684014
          cov(e.LS_w,e.LS_h)      -.6467363        .4597867
          cov(e.SWB_w,e.SWB_h)    -.0444024        1.034903
          -------------------------------------------------
          Observations                   50                
          -------------------------------------------------
          
          . 
          end of do-file
          
          .

          Comment


          • #6
            Dear Andrew Musau ,

            I am extremely grateful for the code you provided, which is incredibly helpful in addressing my problem.

            I also wanted to extend my appreciation for introducing me to the dataex command. Thanks to your guidance, I have learned how to utilize it effectively to present my questions more clearly. It has proven to be an incredibly useful tool and I will continue to use it.

            Your kindness and support have made a significant impact on my study and work. And I am truly grateful for it.

            Warmest regards,
            Mindy

            Comment

            Working...
            X