You mean the ratio (cost per policy) has to be done at observation level? and then you derive the mean of the ratios?
If so, you must compute the individual ratios before hand, proc tabulate cannot do the record-level calculation.
Having said that, the mean of the ratios seems wrong in this case.
The ratio of the sums is the number you want if I understand your data properly.
ratios in Tabulate?
(well .. almost no problem)
Just use pctsum on analysis variable for numerator and point denominator definition to the denominator of the ratio.
After that, you just need to tame the tabulate tendancy to present the result as percentage points with 10% as 10 and not .10, but proc format solves that too!
[pre]Proc format ;
picture mnyR(round) other = '00,000,001.23'( mult=1 prefix='$' ) ;
run;[/pre] * seems it needs that MULT=1 !;[pre]Proc Tabulate Data= SummaryTable ;
Class FRUITS ;
Var claimCount epy incurToDate earnedPrem ;
Table ALL FRUITS
, SUM=' '*claimCount SUM=' '*epy
claimCount=' '*pctsum='claim freq' *f= mnyR. ;
Run ; [/pre]
not quite sure why it is claimCount/epy, but hope the description above will clarify alternative ratios.
forgot to add the $
Message was edited by: Peter.C