BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
abdulla
Pyrite | Level 9

Hi,

 

I want to calculate the customer arrival rate. A customer arrives in the store in how many minutes. For example, from our data, we may get that a customer arrives at the store in every 7 min. 

 

if we have two columns, one for "minute" and the other for "no of the customer", what would be the SAS code? This is a Poisson distribution. Please help

 

Minute  "Customer of customers"

5                    2

10                 6

7                   3

6                   1

4                   2

9                   5

11                 4

2                  3

8                  5

 

So, I want to get " In every how many minutes a customer come?". This is the property of Poisson distribution. The above is just an example. The answer could be " a customer comes in every 1.5 min". 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
abdulla
Pyrite | Level 9

Based on the link which one would be correct

proc genmod data =have;
 model minute = customer / link=log dist=Poisson;
run;

 or the following?

proc genmod data =have;
 model customer = minute / link=log dist=Poisson;
run;

View solution in original post

6 REPLIES 6
abdulla
Pyrite | Level 9
I have edited the question.
unison
Lapis Lazuli | Level 10

Look into proc genmod which has Poisson regression capabilities: https://stats.idre.ucla.edu/sas/output/poisson-regression/

-unison
abdulla
Pyrite | Level 9

Based on the link which one would be correct

proc genmod data =have;
 model minute = customer / link=log dist=Poisson;
run;

 or the following?

proc genmod data =have;
 model customer = minute / link=log dist=Poisson;
run;
Reeza
Super User
It depends a bit on what the data means. How is the first column defined? Is that the number of minutes between customers and you have 2 customers at minute 5 and 6 come in 10 minutes later? If so, you're looking for the mean time between events, which is probably just the following:

proc means data=have mean;
weight customers;
var time;
run;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1663 views
  • 2 likes
  • 4 in conversation