Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Rounding number


From   Ziad El-Khatib <[email protected]>
To   [email protected]
Subject   Re: st: Rounding number
Date   Mon, 3 Mar 2008 05:49:14 -0800

Thank you all!

Can I write command to point to STATA to round the variable itself (wt)?

Best regards
ziad


On Mon, Mar 3, 2008 at 5:37 AM, Joseph Coveney <[email protected]> wrote:
> Ziad El-Khatib wrote:
>
>  Hi STATA lister, tried to look for help round but did not understand it
>
> well.
>  how to round variable (weight) to have it 0 decimal, e.g. 5 instead of 4.20?
>  --------------------------------------------------------------------------------
>
>  If the help for -round()- reads difficultly at first, then it helps to play
>  with the function to get to know it better.  It won't round 4.20 up to 5,
>  however.  I've used -display- below, but it requires -generate- to see what
>  really goes on with -round()-.
>
>  . display round(4.2, 1)
>  4
>
>  . display ceil(4.2)
>  5
>
>  Joseph Coveney
>
>
>
>
>  *
>  *   For searches and help try:
>  *   http://www.stata.com/support/faqs/res/findit.html
>  *   http://www.stata.com/support/statalist/faq
>  *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index