Announcement

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

  • stata ttest significance

    Hi everyone,

    I have the following dataset


    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int NEWID float(age married dep) byte(hh_mem mem) float mig
      1 46 1         1 0 . 0
      2 37 1         1 0 . 0
      3 30 1         2 0 . 1
      4 46 1        .6 0 . 1
      5 55 1         1 0 . 0
      6 60 1  .3333333 0 . 1
      7 31 1  .5714286 0 . 1
      8 35 1 1.3333334 0 . 1
      9 51 1        .5 0 . 1
     10 38 1  .5714286 0 . 1
     11 59 0        .6 0 . 1
     12 45 1       .75 0 . 1
     13 29 1       2.5 0 . 1
     14 66 1      1.25 0 . 0
     15 24 1  .8333333 0 . 0
     16 50 1        .6 0 . 1
     17 29 1       1.5 0 . 1
     18 50 1 .44444445 0 . 1
     19 25 1         1 0 . 1
     20 54 0  .7272727 0 . 0
     21 59 1        .5 0 . 1
     22 65 0      .625 0 . 1
     23 56 1       .25 0 . 0
     24 36 1         1 0 . 0
     25 64 1  .3333333 1 . 0
     26 59 1         1 1 . 0
     27 64 1      .875 0 . 0
     28 64 0  .8888889 0 . 1
     29 33 1 1.3333334 0 . 1
     30 54 1  .7142857 0 . 1
     31 76 1         0 0 . 0
     32 44 1  .6666667 0 . 0
     33 27 0 .16666667 0 . 0
     34 26 1        .8 0 . 1
     35 46 1        .2 0 . 1
     36 48 1         1 0 . 0
     37 50 1         1 0 . 0
     38 63 0       .25 0 . 1
     39 52 0         1 0 . 0
     40 35 0  .4285714 0 . 1
     41 31 0        .6 0 . 1
     42 42 1       2.5 0 . 0
     43 43 1         1 0 . 1
     44 51 0 1.5714285 0 . 1
     45 47 1       1.2 0 . 1
     46 35 1       1.2 0 . 1
     47 50 0         1 0 . 1
     48 41 1      1.25 0 . 0
     49 37 1 1.0555556 0 . 1
     50 37 1  .6666667 0 . 1
     51 33 1       1.2 0 . 0
     52 35 1         2 0 . 1
     53 49 1         0 0 . 0
     54 54 1         0 0 . 0
     55 39 1  .6666667 0 . 0
     56 34 1         4 0 . 0
     57 26 1       1.2 0 . 0
     58 57 1 1.8333334 0 . 1
     59 31 1       1.2 0 . 1
     60 48 1         1 0 . 0
     61 41 1         2 0 . 0
     62 67 1         1 0 . 1
     63 55 1  .2857143 0 . 1
     64 33 1         2 0 . 1
     65 45 1 .44444445 0 . 1
     66 31 1  .6666667 0 . 0
     67 62 1      1.25 0 . 0
     68 56 0  .8333333 0 . 1
     69 22 1  .3333333 0 0 1
     70 50 1         0 0 . 1
     71 23 1        .4 0 . 1
     72 50 1        .4 0 . 1
     73 47 1       1.5 0 . 1
     74 67 1         1 0 . 1
     75 41 1       1.5 0 . 0
     76 37 1       .75 0 . 1
     77 61 1         1 0 . 1
     78 25 1       1.5 0 . 1
     79 32 0 1.3636364 0 . 1
     80 53 0  .8571429 0 . 1
     81 63 0       .75 0 . 0
     82 28 1         1 0 . 1
     83 38 1         1 0 . 0
     84 36 1         1 0 . 0
     85 26 1        .5 0 . 0
     86 26 1         1 0 . 1
     87 40 1 1.6666666 0 . 1
     88 44 1       .25 0 . 1
     89 39 1        .5 0 . 1
     90 48 1        .4 1 0 1
     91 42 1        .4 0 . 1
     92 56 1        .6 0 . 0
     93 54 1  .3333333 0 . 0
     94 45 1        .4 0 . 0
     95 41 1  .6666667 0 . 0
     96 55 1        .5 0 . 0
     97 50 1        .7 0 . 1
     98 57 0       .75 0 . 0
     99 33 1         2 0 . 0
    100 25 1        .5 0 . 0
    end
    i use
    Code:
    global varlist age married dep hh_mem mem
    estpost ttest $varlist, by (mig)
        esttab, wide nonumber mtitle("diff.")
    I want to get the level of significance at 1% 5% and 10% but stata gives me

    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001

    How can i change this to reflect the significance i want to show? Thank you for your help in advance.


  • #2

    Code:
    esttab, note(* 0.10 ** 0.05 *** 0.01)
    Last edited by Chris Boudreaux; 31 Jul 2020, 19:34.

    Comment


    • #3
      Hi Chris thank you for your response. I am not sure if t-test is showing the significance at 10% 5% and 1% level because I get the result as below .




      I used the following code.
      Code:
       global varlist age married dep hh_mem mem estpost ttest $varlist, by (mig)    
      esttab, wide nonumber mtitle("diff.") note(* 0.10 ** 0.05 *** 0.01)
      Attached Files
      Last edited by Naika Sangroo; 01 Aug 2020, 11:06.

      Comment


      • #4
        Hi Naika,

        Sorry! I just realized I meant "star". Type the following and it should work:

        esttab, star(* 0.10 ** 0.05 *** 0.01)

        Comment


        • #5
          Hi Chris,

          Thank you. That worked. :-)

          Comment

          Working...
          X