PROC REPORT versus other Base SAS procedures : EpochResearch Institute India Pvt Ltd. (SASAuthorised Training : Ahmedabad | Bangalore)
It depends on:
- whether you are doing an ad hoc analysis or creating a final report that many people will see
- whether you will run statistical tests with your data or if you just want to see it
- your level of comfort and if you already have working code
Most of my work involves creating final reports that will be
distributed to many users. I am a PROC REPORT specialist, so 90% of the
time, I use PROC REPORT to create these reports.
Here is why:
PROC REPORT versus PROC MEANS/PROC SUMMARY
PROC MEANS is a wonderful, powerful procedure in its own right. It
is an excellent tool for creating data sets of statistics that get fed
into DATA steps or other procedures. I use PROC MEANS extensively, but
not as my final reporting procedure.
PROC MEANS can’t:
- give me percentages
- do traffic lighting
- add, subtract, multiply, or divide two variables
- create new variables
PROC MEANS can give you an overall total and a total for CLASS and BY variables, but so can PROC REPORT.
PROC REPORT versus PROC FREQ
PROC FREQ is really good at creating a small data set of counts that I
can use later. It is a very quick way of calculating percentages,
which might be easier than trying to calculate them in PROC REPORT.
However, starting with PROC REPORT is better for me, just in case I am
asked to make changes to the final output and the changes require
something that PROC FREQ can’t do.
PROC FREQ does not:
- support the STYLE option, so I can’t apply traffic lighting
- calculate simple statistics, like median or mean
- add informative text
PROC REPORT versus PROC PRINT
I like PROC PRINT because it provides a simple, clean way of
displaying data. But, in my way of thinking, PROC REPORT can do
everything PROC PRINT can do and more.
PROC PRINT can only provide the N statistic and a sum of the numeric variables, either for BY groups or the overall data set.
It cannot:
- calculate other statistics
- add, subtract, multiply, or divide two variables
- create new variables
- apply traffic lighting colors based on the value of another valuable
- apply attributes at the row level (only the column level)
PROC REPORT versus PROC TABULATE
For me, PROC TABULATE is the closest competitor to PROC REPORT. Both
are powerful and produce excellent output. However, I think PROC
REPORT has a slight advantage over PROC TABULATE because of its DATA
step capabilities.
PROC TABULATE does:
- calculate row, group, and column percentages using a statistical keyword; PROC REPORT does not
- calculate totals for individual CLASS variables, as well as the combination of CLASS variables with very simple code
- stack variables in a column
- apply style changes such as traffic lighting, but not based on the value of another variable
PROC TABULATE does not:
- add, subtract, multiply, or divide two variables (Note: you can divide in some cases)
- have the ability to create new variables
- insert text in the middle of the table
- give much control over the headers
I have found that PROC REPORT offers me more flexibility, so I
instinctively start with it. You might have a different opinion of which
procedure is best to use. That is ok! If you have a PROC PRINT step
that does everything you need then, by all means, keep using the PROC
PRINT step (or FREQ/MEANS/TABULATE). Don’t change your code for no
reason!
But, if the procedure you are currently using does not give you
everything you need, then change it. It might take less time to change
the procedure than to write code to restructure the data to fit the
current procedure.
Practice using other procedures to expand your programming skills.
For example, if you have a PROC MEANS step you use a lot, see if you can
create the same output using PROC TABULATE or PROC REPORT. When you
become familiar with other procedures, you can switch between them. You
will also internalize which procedure will be the best choice for
certain tasks.
For more information, visit Which Base procedure is best for simple statistics.
For anyone attending this year’s SAS Global Forum, I will be in the
Quad throughout the event. Feel free to find me, I would love to talk
with you about this topic!
Source :
http://blogs.sas.com/content/sastraining/2016/04/07/proc-report-versus-base-sas-procedures/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheSasTrainingPost+%28The+SAS+Training+Post%29
Epoch Research Insitute Links:
Email us: info@epoch.co.in
SAS
Training & Placement Programs with Internship: Epoch Research
Institute India Largest and Oldest #SASTraining Institute (#epochsastraining)
EPOCH RESEARCH INSTITUTE OFFERS:
Authorized SAS TRAINING | SAS CERTIFICATION | SOFTWARE PURCHASE | BUINESS CONSULTING | TECHNICAL SUPPORT ON SAS || SAS STAFFING SOLUTION
Label:
#SASELEARNING,#SASELEARNING,#SASONLINETRAINING,
#SASONLINETRAININGFORBEGINNERS,#LEARNSASPROGRAMMINGONLINE,
#SASCLINICALONLINETRAINING,#SASBASEONLINETRAINING
#BIGDATASASTRAININGEPOCH,#SASBIGDATATRAINING #EPOCHRESEARCHINSTITUTE, #SASTRAINING, EPOCH SAS FEEDBACK,
#CLINICALSAS #CLINICALSASPROGRAMMING #LEARNCLINICALSAS
#LEARNCLINICALSASPROGRAMMING
#CLINICALSAS #CLINICALSASPROGRAMMING #LEARNCLINICALSAS
#LEARNCLINICALSASPROGRAMMING
No comments:
Post a Comment