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
Factor variable and menlDear Statalist User, I am having a problem correctly defining factor variables in a nonlinear model…
looping over observations - retaining the values from previous observationsHello all I am trying to find out the length of wait for each individual for a service given we know…
Looping through multiple dependent variables with outreg2Dear all, I would like to run several regressions, looping through different dependent variables an…
When does multi-collinearity increase significance of regressors?I'm stuck with some unexpected findings that seem to contradict what I (thought I) knew about multic…
"randomselect" in a program used in a simulationHello! I am working on a program that aims to make randomization inference of four coefficients fro…
Subscribe to:
Post Comments (Atom)
0 Response to Best practice when using 'format' while maintaining precision of double
Post a Comment