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

Re: st: Rounding number

From   "Joseph Coveney" <>
To   "Statalist" <>
Subject   Re: st: Rounding number
Date   Mon, 3 Mar 2008 22:37:57 +0900

Ziad El-Khatib wrote:

Hi STATA lister, tried to look for help round but did not understand it
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)

. display ceil(4.2)

Joseph Coveney

*   For searches and help try:

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