asdocx: Export from Stata to Word, Excel, LaTeX & HTML Forums asdocx Forum How to report row percentage and confidence interval using table1 template Reply To: How to report row percentage and confidence interval using table1 template

Attaullah Shah
Moderator
Post count: 70

Support for confidence intervals with survey data has been added. Try this example after updating.

asdocx_update 

* Results from the Stata command  
svy: tabulate  diabetes race  , row  ci 

----------------------------------------------------------------------
Diabetes  |                            Race                           
status    |         White          Black          Other          Total
----------+-----------------------------------------------------------
 Not diab |         .8812          .0931          .0257              1
          | [.8437,.9107]   [.0705,.122]  [.0111,.0586]               
          | 
 Diabetic |         .8203          .1647          .0151              1
          | [.7476,.8755]  [.1203,.2213]  [.0033,.0668]               
          | 
    Total |         .8791          .0955          .0253              1
          | [.8407,.9093]  [.0725,.1249]  [.0108,.0585]               
----------------------------------------------------------------------

* In asdocx, we need to write the treatment variable first 
asdocx svy: tabulate race diabetes, row  ci  template(table1) replace cat(% ci)  
Table 1: Demographics
Variables White (n=9065) Black (n=1086) Other (n=200) P-value
Diabetes status 0.000
Not diabetic
88.121% (84.370 – 91.068) 9.308% (7.045 – 12.201) 2.571% (1.106 – 5.862)
Diabetic
82.028% (74.756 – 87.553) 16.467% (12.027 – 22.134) 1.505% (0.325 – 6.680)
P-values by t-test for continuous variables and Chi2 test for binary/categorical variables. * Design-based Pearson Chi2 test p-value