Date: Fri, 14 Jan 2011 16:55:18 -0500
Reply-To: "Roberts, Michael" <Michael.Roberts@ahca.myflorida.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Roberts, Michael" <Michael.Roberts@ahca.myflorida.com>
Subject: How to identify blocks of consecutive cases in SPSS?
Good Afternoon All,
I'm hoping someone in here would have a solution for a data manipulation problem I am facing, and one which eludes me:
I have cases, some of which are consecutive in time and the only indicator I have is the month - so for a given case, I have an Identifier, and the month (plus other data which are no help!) The problem is that for a given identifier, there are breaks between continuous periods, and I need to be able to measure the length of time any given contiguous period - somewhat like a length of stay in a hospital. I have done something like this in the past with regular dates, but cannot for the life of me remember how I did so, and would appreciate some advice. Data may look like this:
So, 1a has two spans of 3 consecutive months and 2 months, 2a has 1 span of 2 consecutive months, etc.