Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Joerg Luedicke <joerg.luedicke@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: variable format |
Date | Thu, 10 Mar 2011 13:53:19 -0500 |
On Thu, Mar 10, 2011 at 1:27 PM, Andreas Drichoutis <adrihout@cc.uoi.gr> wrote: > Dear all, > > Some variables in my dataset are stored as float %8.0g . I need to have > exactly 2 decimals for these variables, however Stata formats these with > more decimals e.g., it stores the value of 8.77 as 8.7700005. > > How do I convert variables to 2 decimals only. http://lmgtfy.com/?q=stata+variable+format in your case it could be something like format %3.2f yourvariable if you numbers have no more than 3 digits J. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/