asdocx: Export from Stata to Word, Excel, LaTeX & HTML › Forums › asdocx Forum › ttest – number format with large numbers (exponential notation) › Reply To: ttest – number format with large numbers (exponential notation)
Hello Daniel
Concerning the error, please update asdocx with
asdocx_update
and it should fix the error.
To solve the formating issue, please use tzok
option with format(%20.3f)
or any other valid Stata format. See the following example
sysuse auto
replace price = price * 1000000
asdocx ttest price if make != "Toyota Corona", label abb(.) save(test) format(%20.3f) replace tzok
Table: Results
---+---------------------------------------------------------------------------------------------
1 | obs Mean St_Err t_value p_value
----+---------------------------------------------------------------------------------------------
2 | Price 73.000 6171369863.014 347546171.778 17.757 0.000
--------------------------------------------------------------------------------------------------
The following tables shows examples of different available formatting options.
Four values displayed in different numeric display formats
+---------------------------------------------------------------------+
| %9.0g %9.0gc %9.2f %9.2fc %-9.0g %09.2f %9.2e |
|---------------------------------------------------------------------|
| 12345 12,345 12345.00 12,345.00 12345 012345.00 1.23e+04 |
| 37.916 37.916 37.92 37.92 37.916 000037.92 3.79e+01 |
| 3567890 3567890 3.57e+06 3.57e+06 3567890 3.57e+06 3.57e+06 |
| .9165 .9165 0.92 0.92 .9165 000000.92 9.16e-01 |
+---------------------------------------------------------------------+