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
forest plots for sensitivity specificityHi, I am practicing meta-analysis of diagnostic accuracy studies using the midas software on stata u…
How to interpret PCA outcome variables?Hi all, I have a question with regards to principal component analysis. On the basis of pca, I crea…
too many variables, tabulateHi there, I have some troubles with the command tabulate. My Goal is to create a table in Stata, ju…
Interaction effect in probit/logit significant?Dear Listers, My dependent variable is binary, so is one of my two independent variables. The other…
Endogeneity check in Panel data (FE/RE)Dear all, I am working with Panel data (FE and RE models) and performing several diagnostic tests a…
Subscribe to:
Post Comments (Atom)
0 Response to Best practice when using 'format' while maintaining precision of double
Post a Comment