Bookmark and Share

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: RE: Help with multiple baseline data


From   Joe Canner <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: Help with multiple baseline data
Date   Mon, 9 Sep 2013 14:25:02 +0000

Mats,

If you save your dates using Stata datetime format, you can simply subtract the baseline date from the follow-up date and get the number of days elapsed:

. gen bldate=date(dxdate,"DMY")
. gen fudate=date(visdate,"DMY")
. gen elapsed=fudate-bldate

This should accomplish what you are looking for.  If your baseline and follow-up visits are not in the same observation, you can use -reshape- or -bysort- to deal with that.  

Regards,
Joe Canner
Johns Hopkins University School of Medicine

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mats Martinell
Sent: Monday, September 09, 2013 10:16 AM
To: [email protected]
Subject: st: Help with multiple baseline data

Dear Statalist,
I'm working on a registry of patients with diabetes. The patients (cases) are included at time of diagnosis, thus almost all cases have different dates (ddmmyyyy) for their first registration. The patients are divided into three groups depending on blood sugar concentration at diagnosis. I would like to graph the mean (with 95% CI) blood sugar concentration for each group over time. My problem is the following:

1. Is there a way I can create a common baseline (day 0) from their date of diagnosis for each case?

2. The follow-up measurements are at differentdates and not at a fixed date from diagnosis. Is there a way to generate a variable for the follow-up measurements ( X days after diagnosis (day 0))?


Best regards,
Mats Martinell
PhD stud
Uppsala university, Sweden




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

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index