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]
st: how to keep number after comma only
From
Dao Kim <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: how to keep number after comma only
Date
Tue, 25 Feb 2014 16:24:52 +0000
Hi, sorry for my basic questions, new with stata. I am trying to keep only the digits of a number, for example 37.1 weeks in order to convert it into days. I could keep the first 2 numbers with "gen long term_days = floor(term/10)", how does it work for the number after the comma?
Thanks!
________________________________________
De : Dao Kim
Envoyé : jeudi 20 février 2014 22:04
À : '[email protected]'
Objet : mean of 4 variables
Hi, I am trying to make the mean of 2 to 4 variables corresponding to the dosage for a drug, giving at different times to the same patient. How do I generate the mean dosage variable? Thanks
*
* 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/