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
Add trend line to a grouped bar graph?I'm wanting to add 1 or more trend lines (lfit?) to bar graph with 3 variables over month. Here's cu…
Estimating policy effect with Logit modelSo I am testing a policy which was introduced in a country trying to incentivise people to stay empl…
Execute same syntax across multiple stata datasetsHello, I am constructing a pooled dataset from the demographic and health surveys (DHS). Currently…
Stationary of dataI am doing a time series analysis and the first step to carry out the analysis is to check whether t…
Using a Difference-in-Difference approach with a logit modelI am trying to run a simple DID model with a binary dependent variable, i.e. a logit model. Is this …
Subscribe to:
Post Comments (Atom)
0 Response to Best practice when using 'format' while maintaining precision of double
Post a Comment