Statalist


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

st: round () if


From   Shehzad Ali <[email protected]>
To   [email protected]
Subject   st: round () if
Date   06 Feb 2009 15:45:24 +0000

Hi listers,

I want to round a variable 'week' if it is within 2 weeks range of multiples of 12 week. So 10 weeks should become 12 weeks while 9 weeks should not change. Similarly 21 weeks would not change while 25 weeks will change to 24 weeks. Is there a way to do it in Stata using -round- or other command?

Thank you,
Shehzad
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index