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
xtpoisson with fixed effectsHello all, I have a panel dataset of 3 million observations, with each observation detailing the an…
Help regarding panel categorical data analysis in Stata I am recently researching crises and the usefulness of different models in predicting them. It woul…
Stata module tstfHello, Do folks have experience using the Stata module tstf to compute intervention time-series mod…
Counterfactual binary choice modelHello, I want to do counterfactual for my binary choice model of schooling decision. Specifically, …
Goodness of fit indices unavailable when using SEM with vce(robust), what's the reason?Hello All, I was able to find several posts asking why we can't get goodness of fit indices (RMSEA,…
Subscribe to:
Post Comments (Atom)
0 Response to Best practice when using 'format' while maintaining precision of double
Post a Comment