|
Tony
you might find interesting, a paper Myro Olstik and I gave to
The Last SUGI. Myra found ODS statistics summary unsatisfactory.
We developed a process that generates a column for each requested
statistic with a row output for each analysis variable. Class vars
are supported. This is achieved with just one pass through the
data to be analysed. Although out process does not wrap the complete
proc means functionality, it might be an interesting challenge to
locate the gaps ;-).
Recently Myra gave the paper again, to NESUG.
The link for the paper in SUGI proceedings is:
Paper 059-31: Myra A. Oltsik, Peter Crawford
A Better Means – The ODS Data Trap
http://www2.sas.com/proceedings/sugi31/059-31.pdf
Peter Crawford
London
On Thu, 5 Oct 2006 02:15:51 -0700, TK <Tony.Kelleher@CSO.IE> wrote:
>Hi,
>
>You have invested a lot of time to get proc means to send the exact
>output you want to the ODS (output delivery system). The options you
>put on the proc means statement did this for you. As Dan says, a plain
>output out statement will only send the default statistics (N, MIN,
>MAX, MEAN STD) to an output data set. His revised one:
>
>output out=test mean=mean std=std lclm=lclm uclm=uclm;
>
>improves that but only gives us the required statistics for the
>MoneyRaised variable. You would have to amend further to get the
>required information on the HoursVolunteered variable:
>
>output out=test mean(MoneyRaised)=mean_MR std(MoneyRaised)=std_MR
>lclm(MoneyRaised)=lclm_MR uclm(MoneyRaised)=uclm_MR
> mean(HoursVolunteered)=mean_HV
>std(HoursVolunteered)=std_HV lclm(HoursVolunteered)=lclm_HV
>uclm(HoursVolunteered)=uclm_HV;
>
>There is a much easier way to do this using ODS TRACE and ODS OUTPUT
>statements. Use an ODS TRACE statement to determine the name of ODS
>object that you have sent to the ODS. This information will be printed
>in your SAS log. You should see that your PROC MEANS creates an object
>called 'Summary' in the ODS. You can then use an ODS OUTPUT statement
>to save your customised ODS output as a SAS data set. Try the
>following amendments to your PROC MEANS and examine your log and the
>contents of the SAS data sets test and test2:
>
>ods trace on;
> proc means data=charity fw=8 maxdec=2 alpha=.1 clm mean std;
> class Year;
> var MoneyRaised HoursVolunteered;
> title 'Confidence Limits for Fund Raising Statistics';
> title2 '1992-94';
> output out=test mean(MoneyRaised)=mean_MR std(MoneyRaised)=std_MR
>lclm(MoneyRaised)=lclm_MR uclm(MoneyRaised)=uclm_MR
> mean(HoursVolunteered)=mean_HV
>std(HoursVolunteered)=std_HV lclm(HoursVolunteered)=lclm_HV
>uclm(HoursVolunteered)=uclm_HV;
> ods output Summary = test2;
>run;
>ods trace off;
>
>Hope this helps !
>
>Regards,
>
>Tony Kelleher
>Central Statistics Office,
>Skehard Road,
>Cork, Ireland
|