Programming the statistical procedures from SAS

Count variables analysis

Regular Contributor
Posts: 234

Count variables analysis

Dear all,

Can I please ask how do I go about analyse a data with 3 variables as such

-  a 2-block time variable with nth categories ie 12am-2am, 2.01am-4.00am and etc (time).

-  2 count variables, one being the total number of calls made for the ith time category(n) and another one being the cases resolved for the ith time category(x).

I wish to find out the adjusted proportion of cases resolved for each time categories taking into account the number of calls made at the same time. I would think the more calls made the more cases resolved and more weighting for that time slot. Is my proc genmod below correct? Or am i completely off the right track? Any input is greatly appreciated.

proc genmod data=foo;

   class time/ param=ref;

   model x=time / offset=log_n dist=poisson link=log;

   exact time / joint estimate;


SAS Employee
Posts: 308

Re: Count variables analysis

It sounds to me like this is a simple logistic model applied to aggregated data.  So, you could use PROC LOGISTIC and events/trials syntax as below.  Unless the data set is small and sparse, the EXACT statement isn't necessary and would probably take too much time.

proc logistic;

class time;

model x/n = time;


Respected Advisor
Posts: 2,655

Re: Count variables analysis

Posted in reply to StatDave_sas

I agree, especially if the denominator is large.  However, if the denominator is less than 50, then the genmod code would be my preference.

Steve Denham

Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation