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
Creating an indexHello, I would like to create an index with several variables (high-tech exports in US$, no. of tech…
error r(198)Hi everyone, I am doing an event study analysis and when I use the estudy command, I get this error:…
Significance tests after statsby with sureg regressionDear all, I am doing an Event-Study with 649 firm announcements and estimate every announcement wit…
predictnl and factor variablesDear All, suppose I have the following: Code: logit Y X1 X2 X3 i.COUNTRY i.YEAR, cluster(S003) Af…
Pooled OLS with interaction on almost all explanatory variablesDear Statalist, I have panel data covering 763 firms over 15 years, taken from an industry consorti…
Subscribe to:
Post Comments (Atom)
0 Response to Best practice when using 'format' while maintaining precision of double
Post a Comment