Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Decimal and whole numbers in variables


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Decimal and whole numbers in variables
Date   Fri, 10 Jan 2014 14:33:46 +0000

<>

Check out -ceil()-

. di ceil(123.333)

See also

SJ-3-4  dm0002  . . . . . . . . Stata tip 2: Building with floors and ceilings
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
        Q4/03   SJ 3(4):446--447                                 (no commands)
        tips for using floor() and ceil()

http://www.stata-journal.com/sjpdf.html?articlenum=dm0002

and

http://www.stata-journal.com/article.html?article=dm0058

Nick
[email protected]


On 10 January 2014 14:28, Miguel A. Duran <[email protected]> wrote:
> If you have a variable that has decimal and whole numbers,
> does anyone know how to transform decimal numbers into their following whole
> number (eg, 123.333 into 124)?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index