|
On 5/12/07, Andrew H Karp <sfbay0001@aol.com> wrote:
> Hello...
>
> First, I would like to politely disagree with your position that
> "everyone things that ODS OUTPUT is the "only" way one should request
> output from procedures in the modern SAS world." That's a bit
> overbroad, and frankly, incorrect, in my opinion.
Of course, I have no idea what anyone thinks. I just said to get your
attention.
> I think it is important to understand the core difference between
> using the ODS OUTPUT destination to create a SAS data set holding a
> data component from a SAS analytic procedure and using the PROC's own
> OUT or OUTEST option. When you use ODS OUTPUT, the procedure is
> generating a data component and then giving it to ODS for "delivery"
> to one or more destinations, of which OUTPUT is but one (the others
> include RDF, PDF, HTML, etc.).
I agree. But that is not relevant to my point.
> When you use an OUT= or OUTEST= option in a PROC step, then the
> procedure generates the data set. In many situations, especially with
> STAT and ETS module PROCs, the data sets created by a procedure were
> "designed" to be passed in to other PROCs (e.g., PROC SCORE) to
> accomplish some other task in your project. If, for example, your
> goal is to generate some parameter estimates from one data set that
> you then want to apply to a second data set, the ODS-generated data
> set will be of little use to PROC SCORE.
I agree. But that is also not relevant to my point.
> In many situations the stucture and contents of an ODS object
> delivered to the OUTPUT destination is so different than the data set
> created by an OUT= or OUTEST option that any comparison between the
> two of them is meaningless. Also, ODS makes _any_ part of _any_ ODS-
> compliant procedure's output "available" for "delivery" as a SAS data
> set, not so for the OUT= and OUTEST= options.
Yes, again. I'm not saying ODS OUTPUT is not useful. I'm say look
first at built in OUTPUT before turning to ODS OUTPUT if performance
is a consideration.
> While I appreciate that there was some processing time savings in the
> example you provided, I do not think it provides proof (either "beyond
> a reasonable double" or " by a preponderance of the evidence") that
> one approach is invariantly better than the other.
Some time savings? It proves that if you run 50000 regressions and
want one statistic R-square, use OUTEST.
>
> Thank you for taking my thoughts in to consideration.
>
> Andrew Karp
> Sierra Information Services
> www.SierraInformation.com
>
>
>
>
> On May 12, 5:58�am, datan...@GMAIL.COM ("data _null_;") wrote:
> > I know everyone thinks ODS OUTPUT is the "only" way one should request
> > output from procedures in the modern SAS world. And in many
> > situations ODS OUTPUT is only way to get statistics into a SAS data
> > set.
> >
> > However it is my observation that ODS OUTPUT is slow compared to the
> > same output produced with a OUTPUT option from a procedure. For
> > example consider the fellow who wants thousands of R-SQUARE statistics
> > from PROC REG. This output can be obtained using
> >
> > ODS OUTPUT FITSTATISTICS
> > or
> > RQUARE OUTEST=
> >
> > The following example keeps the minimum amount of output desired but
> > ODS is much slower.
> >
> > Using ODS OUTPUT.
> > NOTE: PROCEDURE REG used (Total process time):
> > real time 22.90 seconds
> > user cpu time 22.84 seconds
> > system cpu time 0.06 seconds
> > Memory 252k
> >
> > NOTE: The data set WORK.FITSTATISTICS has 50000 observations and 4 variables.
> >
> > Using OUTEST=
> > NOTE: PROCEDURE REG used (Total process time):
> > real time 3.34 seconds
> > user cpu time 3.23 seconds
> > system cpu time 0.09 seconds
> > Memory 196k
> >
> > NOTE: The data set WORK.EST has 50000 observations and 3 variables.
> >
> > options fullstimer;
> > proc plan;
> > factors col1=25 ordered col2=2000 ordered
> > y=10 of 100 / noprint;
> > treatments x=10 ordered;
> > output out=work.reg;
> > run;
> >
> > ods listing close;
> > *ods trace on / listing;
> > proc reg data=work.reg;
> > by col:;
> > model y = x;
> > ods output FitStatistics= FitStatistics(keep=col: label2 nvalue2
> > where=(label2='R-Square'));
> > run;
> > quit;
> > *ods trace off;
> > ods listing;
> >
> > proc contents varnum data=WORK.FITSTATISTICS;
> > proc print data=WORK.FITSTATISTICS(obs=20);
> > run;
> > proc reg data=work.reg outest=work.est(keep=col: _RSQ_) noprint rsquare;
> > by col:;
> > model y = x;
> > run;
> > quit;
> > proc contents varnum data=WORK.est;
> > proc print data=WORK.est(obs=20);
> > run;
>
|