I added set type double at the beginning of my code to implement the double-precision for all newly created variables. This works fine.
However, I also want to display values of my newly created variables with two-decimal digits (e.g. 0.34, 12.01, 9.30). I naively thought that enabling double-precision throughout and then running format new_variable %12.2fc would do the trick. Clearly it doesn't as the format command cause precision issues.
How can I then display newly created variables with two-decimal digits while minimizing any lose in precision?
Thank you.
Related Posts with Best practice when using 'format' while maintaining precision of double
Check whether coefficients are significant using 2 SE bandsHello, I am reading a paper and it says that the following figure (which draws 2 SE bands) is used …
set quarterly datesDear All, I have this dataset, Code: * Example generated by -dataex-. To install: ssc install data…
how to calculate the typical paper:change in relative wage1963-1987: suppl and demand in stata(is there an order?)does anyone know how to calculate the typical paper:change in relative wage1963-1987: suppl and dema…
Trouble working with panel data and including too many dummy variablesI am analyzing public and charter high schools in the state of California. I am interested in Charte…
Generating variable for a range of datesHi, I am looking to create a variable that encompasses several dates. I am doing a project on produ…
Subscribe to:
Post Comments (Atom)
0 Response to Best practice when using 'format' while maintaining precision of double
Post a Comment