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;

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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