Counting active records for each hour of days of week

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

livinsky
Posts: 6
Joined: Mon Sep 12, 2011 8:08 am

Counting active records for each hour of days of week

Postby livinsky » Mon Sep 12, 2011 9:30 am

I have a list of record numbers with the date / time they began and ended. Some of the records ended in the same hour they began, some within a few hours and a few ended up to 3 days after inception. The data covers a calendar year for 5 locations, but am testing the report on a small excerpt.

I am trying to get to the point where I can say, over the year (on average), there were X amount of active records at, for example, 05.00 on a Sunday!

We are relatively inexperienced at using SPSS, so any guidance is welcome!

Thanks
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Counting active records for each hour of days of week

Postby GerineL » Mon Sep 12, 2011 3:36 pm

sorry I don't understand your question.

please be more precize about what your data looks like now, and what you want with it.
livinsky
Posts: 6
Joined: Mon Sep 12, 2011 8:08 am

Re: Counting active records for each hour of days of week

Postby livinsky » Mon Sep 12, 2011 3:52 pm

I currently have a list of individual records for a calendar year. Each record details the record number, start date/time and end date/time.

For demand mangement, I have been asked to determine how many of these records were "active" - had began, but not yet ended - within each of the 24hours for each day of the week averaged over the year.

Obviously we can determine the average number began for the time periods and days, but need to factor in those already still open from preceeding periods. I wondered if some form of churn analysis could adress this, but am unsure how to proceed.

Does this clarify?
livinsky
Posts: 6
Joined: Mon Sep 12, 2011 8:08 am

Re: Counting active records for each hour of days of week

Postby livinsky » Mon Sep 19, 2011 6:13 am

Good morning,

This query is now becoming urgent.

Can someone please advise if this is possible or not in SPSS - We can wait for advice as to the mechanics of the calculation if we know it is possible in the first place.

Thank you.
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Counting active records for each hour of days of week

Postby GerineL » Mon Sep 19, 2011 8:44 am

sorry I was intending to get into this but I forgot.
I don't have the time now to really sort this out.
Maybe you can look into the date-time wizard.

I am not sure if you can use if functions for date variables.
Then you can create a variable using if-functions

if (startdate < currentdate & enddate > currentdate) active = 1.

otherwise you could maybe use the date-time wizard to recalculate the variables into age in months compared to today, and do somehting with that.

sorry I can't give you more info now.
livinsky
Posts: 6
Joined: Mon Sep 12, 2011 8:08 am

Re: Counting active records for each hour of days of week

Postby livinsky » Mon Sep 19, 2011 9:24 am

Thanks for this.

I take it I would need to set up a dummy list to represent day of the year, but how would I factor in the hour of the day?

I am trying to be able to say, for each location, there were x amount of active records at y o'clock on z day of the week.

thanks again
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Counting active records for each hour of days of week

Postby GerineL » Mon Sep 19, 2011 10:30 am

just look into the date-time wizard and explore the options, I think there's lots of possibilities.

see manual

http://www.helsinki.fi/~komulain/Tilast ... -Guide.pdf
livinsky
Posts: 6
Joined: Mon Sep 12, 2011 8:08 am

Re: Counting active records for each hour of days of week

Postby livinsky » Tue Nov 01, 2011 6:13 am

Morning,
I'm really struggling with this one!

Are there any other tips or advice on how to address this problem?

Nothing we have tried is working - we cannot get it to still count those records began but not yet ended.

thank you
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Counting active records for each hour of days of week

Postby GerineL » Wed Nov 02, 2011 8:42 am

again, example data would help!!
livinsky
Posts: 6
Joined: Mon Sep 12, 2011 8:08 am

Re: Counting active records for each hour of days of week

Postby livinsky » Wed Nov 16, 2011 6:11 am

Very small example - hope this helps.
You do not have the required permissions to view the files attached to this post.
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Counting active records for each hour of days of week

Postby GerineL » Wed Nov 16, 2011 1:59 pm

1. please give an spss file so I can try stuff, this still doesnt help

2. Please give an example of what you want (e.g. I want to know how many cases were active at date X time Y).

3. Do I understand correctly that you want the amount of active cases for thousands of differetnt date/times?

Who is online

Users browsing this forum: No registered users and 1 guest

cron