Extracting earliest date

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

nkslewis
Posts: 2
Joined: Tue May 08, 2012 8:15 pm

Extracting earliest date

Postby nkslewis » Tue May 08, 2012 8:23 pm

I am working with a large set of survey data. Individuals were surveyed within organizations. There are about 1,000 organizations with 20-2000 or more responses per organization. Each organization has a unique ID that is stored with each response. The date on which each respondent took the survey is included in each respondent's case in the SPSS file. Surveys were administered over a 2-4 week period at each organization, but the time periods differed between organizations.

I need to determine the earliest date that a survey response was completed for each organization. I can't think of a way to do this easily in SPSS. Any help would be greatly appreciated.
Penguin_Knight
Posts: 473
Joined: Thu Apr 05, 2012 5:58 pm

Re: Extracting earliest date

Postby Penguin_Knight » Tue May 08, 2012 8:54 pm

Suppose your organization variable is called "org" and your date variable is called "date".

1) Go to Data > Aggregate
2) In the new window, put "org" into "Break Variable(s)"
3) Put "date" into "Summary of Variable(s)"
4) Click the Function button below
5) Choose "Minimum"
6) Click "Continue"
7) Click "OK"

Now the minimal date for each organization should have been appended to the end of your data set as a new variable.
Penguin_Knight
Posts: 473
Joined: Thu Apr 05, 2012 5:58 pm

Re: Extracting earliest date

Postby Penguin_Knight » Tue May 08, 2012 8:58 pm

The above method adds a new variable to your data.

If you just want a table output, here is another way:

1) Go to Analyze > Compare Means > Means
2) Put "org" into "Independent List"
3) Put "date" into "Dependent List"
4) Click the button "Options"
5.a) Bring "Minimum" from the left to the right panel
5.b) If you don't want the Mean, Number of cases, and Std. Deviation, you can bring those back to the left panel
6) Click Continue
7) Click OK
nkslewis
Posts: 2
Joined: Tue May 08, 2012 8:15 pm

Re: Extracting earliest date

Postby nkslewis » Tue May 08, 2012 9:40 pm

Thank you so much, that worked perfectly. I sure appreciate this forum.

Who is online

Users browsing this forum: No registered users and 1 guest

cron