Statalist


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

Re: st: RE: summarizing dates


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: RE: summarizing dates
Date   Fri, 17 Aug 2007 12:01:34 -0400

Learn something every day. I tried -sum, f(%d)-
but when that failed didn't check the documentation.

thanks,
Jeph


Steichen, Thomas J. wrote:
Try the format option of summarise:

. sum admit_date if missing(disch_date), format

Tom

-----------------------------------
Thomas J. Steichen
[email protected]
-----------------------------------
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jeph Herrin
Sent: Friday, August 17, 2007 11:13 AM
To: [email protected]
Subject: st: summarizing dates


I'm working with multiple observations per subject,
each with multiple date fields (eg, admission to hospital,
discharge from hospital, readmission, death). In trying
to work with them, I would like to be able to summarize
them. Eg,

.sum admit_date if missing(disch_date)

But of course, this produces Stata elapsed date values,
which are only barely meaningful without formatting.
What I'd like to do is something like the above but get
mean, median etc displayed as formatted dates. Is there
a utility out there that can help? I know I can convert
them all to Julian dates, but those will be barely more
intelligible, and YYYYMMDD format will give distorted
summary values.

thanks,
Jeph
*
* 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/

-----------------------------------------
CONFIDENTIALITY NOTE: This e-mail message, including any
attachment(s), contains information that may be confidential,
protected by the attorney-client or other legal privileges, and/or
proprietary non-public information. If you are not an intended
recipient of this message or an authorized assistant to an intended
recipient, please notify the sender by replying to this message and
then delete it from your system. Use, dissemination, distribution,
or reproduction of this message and/or any of its attachments (if
any) by unintended recipients is not authorized and may be
unlawful.
*
* 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/



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