Hi. For your siduation that has lots of statistical estimator, The 'proc tabulate' is the best choice.And Cynthia@sas can make it very well.
[pre]
data temp;
input id signupdate : mmddyy8. logindate : mmddyy8. activity $;
format signupdate mmddyy8. logindate mmddyy8. ;
dif=intck('day',signupdate,logindate);
interval=floor(dif/30)+1;
drop dif ;
datalines;
1 11/01/07 11/01/07 open
1 11/01/07 11/06/07 open
1 11/01/07 11/07/07 start
1 11/01/07 11/22/07 open
1 11/01/07 12/06/07 start
1 11/01/07 12/08/07 open
2 12/05/07 01/01/08 start
2 12/05/07 01/22/08 open
2 12/05/07 01/28/08 start
2 12/05/07 01/29/08 open
;
run;
options missing=0;
ods html file='c:\tab.html' style=sasweb;
proc tabulate data=temp;
class id interval activity;
table id*interval='month',activity='Number of activity' all='Number of Login';
keylabel n=' ';
run;
ods html close;
[/pre]
Ksharp
Message was edited by: Ksharp
... View more