```Date: Mon, 14 Feb 2011 17:07:59 -0800 Reply-To: "Choate, Paul@DDS" Sender: "SAS(r) Discussion" From: "Choate, Paul@DDS" Subject: Re: many days in 13 months Comments: To: Kim Brown In-Reply-To: <201102142203.p1EK7msB003217@waikiki.cc.uga.edu> Content-Type: text/plain; charset="us-ascii" Hey Kim - This is hair-splitting, but you may want to think about your 13 month window a bit. Although small enough to likely be unimportant in your study, the suggested INTNX method biases the exposure for treatment for studies starting in the first vs. the second half of the year. The problem is that using INTNX to come up with a day 13 months afterwards has problems with the 29th, 30th and 31st of some months because there is no corresponding day 13 months later. Months alternate 31-28-31-30-31-30-31-31-30-31-30-31 and so except for July or December, 31 day months always come into a shorter month the next year. Because of February this can happen five ways in January: Begin +13 Mos ============== Jan29 >> Feb28 Jan30 >> Feb28 or >> Feb29 Jan31 >> Feb28 or >> Feb29 Mar31 >> Apr30 May31 >> Jun30 ============== Aug31 >> Sep30 Oct31 >> Nov30 ============== So for the first half of the year your interval for five or seven dates (depending on leap year) is shorter than for the two corresponding dates in the second half. You will have exposures of between 393-397 days in your study, with shorter durations for intervals starting in Jan-May. If you want your exposure to be truly equal you will need to count exposure days between events. If weekends and holidays are not included this gets complicated. Otherwise there are an average of 395.6875 days in 13 months, so I would stick with your original plan and just check "if (d2-d1)<396;" or similar. This code looks at 2000-2010 and the expected exposures you'd see by quarter: data Thirteen; do BeginDate ='01jan2000'd to '31dec2010'd; ThirteenMosLater=intnx('month',BeginDate,13,'sameday'); Exposure=BeginDate-ThirteenMosLater; Quarter=put(BeginDate,qtr.); output; end; run; proc means data=Thirteen; class Quarter; var Exposure; run; Hope that is useful! Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Kim Brown Sent: Monday, February 14, 2011 2:03 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: many days in 13 months Thanks data_null_, Sterling, Art and Tom for your thoughts and suggestions. This information was truly helpful. ```

Back to: Top of message | Previous page | Main SAS-L page