Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: display number of decimal places


From   Rebecca Coates <r.coates@uq.edu.au>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: display number of decimal places
Date   Tue, 11 Sep 2012 07:21:56 +0000

Dear Statlist,
Is there a way I can produce a list that shows not the number of columns in a variable, but the  maximum number of decimal places after the decimal point?
For example, the variable RPZ_S1 is a float variable, with the format %9.0g and contains Z scores. 
Example values look like this: -1.273682
I would like to produce a list that tells me that variable RPZ_S1 contains 6 decimal places.

Thank you
Rebecca Coates


Rebecca Coates
Data Archivist/ PhD Candidate
Australian Data Archive- UQ Node
Institute for Social Science Research
The University of Queensland
Room 419, Level 4, GPN3 (Building 39A), Campbell Road
ST LUCIA   QLD   4072
AUSTRALIA
 
Phone: +61 7 334 60747
Email:  r.coates@uq.edu.au
Website: http://www.issr.uq.edu.au | http://www.ada.anu.edu.au 
CRICOS Provider No. 00025B

This email is intended solely for the addressee.  It may contain private or confidential information.  If you are not the intended addressee, you must take no action based on it, nor show a copy to anyone.  Kindly notify the sender by reply email.  Opinions and information in this email which do not relate to the official business of The University of Queensland shall be understood as neither given nor endorsed by the University.

Please consider the environment before printing this e-mail.




*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index