Hi Statalisters,

I seem to have found some unexpected (to me) behaviour from the -table- command. A reproducible example is pasted below which describes a sample size calculation carried out using -power-, and then summarizing the results of total sample size into a neat table.

Code:
power twoproportions (0.05(0.05).3), power(0.9) diff(.05 .1 .15 .2) alpha(0.05) effect(diff) saving("mypowertable.dta", replace)
use mypowertable
table p2 p1 [fw=N], contents(freq) format(%5.0f) concise missing
This is the output that I receive:

Code:
----------------------------------------------
          |                 p1                
       p2 |  .05    .1   .15    .2   .25    .3
----------+-----------------------------------
       .1 | 1164     .     .     .     .     .
      .15 |  376  1836     .     .     .     .
       .2 |  202   532  2424     .     .     .
      .25 |  130   266   670  2928     .     .
       .3 |    .     .   322     .  3348     .
       .3 |    .   164     .   784     .     .
      .35 |    .     .   194   370   880  3684
       .4 |    .     .     .   218   406   954
      .45 |    .     .     .     .     .   434
      .45 |    .     .     .     .   236     .
       .5 |    .     .     .     .     .   248
----------------------------------------------
And this is the output that I expect (note that there are no longer two rows for p2 = 0.3 or 0.45:

Code:
----------------------------------------------
          |                 p1                
       p2 |  .05    .1   .15    .2   .25    .3
----------+-----------------------------------
       .1 | 1164     .     .     .     .     .
      .15 |  376  1836     .     .     .     .
       .2 |  202   532  2424     .     .     .
      .25 |  130   266   670  2928     .     .
       .3 |    .    164   322   784   3348     .
      .35 |    .     .   194   370   880  3684
       .4 |    .     .     .   218   406   954
      .45 |    .     .     .     .     236  434
       .5 |    .     .     .     .     .   248
----------------------------------------------