Announcement

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

  • #16
    @Robert Picard, Thank you very much. Yes, the problem is solved.
    Thank you a lot.

    Comment


    • #17
      Andrew Musau, As Robert Picard suggests the difference lies in Stata Versions.
      I am grateful to you for your help.

      Comment


      • #18
        Thanks to Robert for figuring out that this was a version issue. In #8, you had asked

        Also, I would request you to kindly consider assigning asterisks (***, **, *) to Zt based on P-values.
        From the output you get from Robert's code, you can create a string variable (I name it Zt2) with the stars. I define significance (0.01, 0.05, 0.1) corresponding to (***, **, *), respectively.

        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input int id float(year gcf N Zt p)
        1 1996 19.6239 16  -3.397825 .003397933
        2 1996 24.8513 16 -1.1205376  .14433682
        3 1996 26.3377 16  -3.051892 .006106116
        4 1996 8.20981 16  -2.194499 .026465764
        5 1996 21.6706 16  -1.735727  .05663171
        end
        
        gen Zt2= cond(p<=0.01, string(Zt)+"***", cond(inrange(p, 0.0101, 0.05), string(Zt)+"**", cond(inrange(p, 0.0501, 0.1),string(Zt)+"*",string(Zt))))


        Result:

        Code:
        . l
        
             +----------------------------------------------------------------+
             | id   year       gcf    N          Zt          p            Zt2 |
             |----------------------------------------------------------------|
          1. |  1   1996   19.6239   16   -3.397825   .0033979   -3.397825*** |
          2. |  2   1996   24.8513   16   -1.120538   .1443368      -1.120538 |
          3. |  3   1996   26.3377   16   -3.051892   .0061061   -3.051892*** |
          4. |  4   1996   8.20981   16   -2.194499   .0264658    -2.194499** |
          5. |  5   1996   21.6706   16   -1.735727   .0566317     -1.735727* |
             +----------------------------------------------------------------+

        Comment


        • #19
          Andrew Musau Thank you for this help.
          Really grateful to you!!!
          Sorry for troubling you a lot....

          Comment

          Working...
          X