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

From |
Suzy <scott_788@wowway.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: code to round a continuous variable to the nearest 1/10th |

Date |
Fri, 19 Aug 2005 12:19:36 -0400 |

Thank you for the explicit code - I appreciate it! Richard Goldstein wrote:

use the round function (e.g., gen x2=round(x1,.1)) Note, however, that numbers such as .1 do not have an exact binary representation and therefor you still might not quite match the SAS results Rich Suzy wrote:Dear Statalistmembers,

I am trying to replicate results from a SAS program and I need to know if there is a simple code to round to the nearest 10th for a continuous variable.

Thank you!

Suzy

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

**References**:**st: code to round a continuous variable to the nearest 1/10th***From:*Suzy <scott_788@wowway.com>

**Re: st: code to round a continuous variable to the nearest 1/10th***From:*Richard Goldstein <richgold@ix.netcom.com>

- Prev by Date:
**RE: st: code to round a continuous variable to the nearest 1/10th** - Next by Date:
**RE: st: Limit on number of macros** - Previous by thread:
**Re: st: code to round a continuous variable to the nearest 1/10th** - Next by thread:
**RE: st: code to round a continuous variable to the nearest 1/10th** - Index(es):

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