• Complain

Holland - SAS Programming and Data Visualization Techniques a Power Users Guide

Here you can read online Holland - SAS Programming and Data Visualization Techniques a Power Users Guide full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: Berkeley;CA, year: 2015, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Holland SAS Programming and Data Visualization Techniques a Power Users Guide
  • Book:
    SAS Programming and Data Visualization Techniques a Power Users Guide
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2015
  • City:
    Berkeley;CA
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

SAS Programming and Data Visualization Techniques a Power Users Guide: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "SAS Programming and Data Visualization Techniques a Power Users Guide" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Part One: Programming Efficiency Techniques -- Chapter 1: The Basics of Efficient SAS Coding -- Chapter 2: How to Use Look-up Tables Effectively -- Chapter 3: Case: SAS Skills in Epidemiology -- Part Two: External Interfaces -- Chapter 4: SAS to R to SAS -- Chapter 5: Knit Perl and SAS for DIY Web Applications -- Chapter 6: Case: Running Clinical Trials Programs in Enterprise Guide -- Chapter 7: Running SAS Programs in SAS Studio -- Chapter 8: Everyday Uses for SAS Output Delivery System (ODS) -- Part Three: Data Visualization -- Chapter 9: Introduction to Graph Templates -- Chapter 10: Introduction to ODS Graphics Procedures -- Chapter 11: Generating Graph Templates -- Chapter 12: Converting SAS/GRAPH Plots to ODS Graphics -- Chapter 13: Customizing Graph Templates -- Chapter 14: ODS GRAPHICS Statement.

Holland: author's other books


Who wrote SAS Programming and Data Visualization Techniques a Power Users Guide? Find out the surname, the name of the author of the book and a list of all author's works by series.

SAS Programming and Data Visualization Techniques a Power Users Guide — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "SAS Programming and Data Visualization Techniques a Power Users Guide" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Part I
Programming Efficiency Techniques
Abstract
Throughout my career, I have worked in industries where programming performance was central to my job. This part of the book examines various aspects of programming performance:
Programming Efficiency Techniques
Overview
Throughout my career, I have worked in industries where programming performance was central to my job. This part of the book examines various aspects of programming performance:
  • , The Basics of Efficient SAS Coding, looks at performance in terms of the difference between the speed of program processing and program maintenance, and how to program to make maintenance easier.
  • , How to Use Lookup Tables Effectively, examines different techniques for merging large data sets with one or more smaller data sets, and how the performance of each technique changes with increasing data volumes.
  • , Case: SAS Skills in Epidemiology, explains how SAS programmers working in epidemiology use different programming techniques than those working on clinical trials, due to the greater volumes of data used in epidemiology.
Philip R. Holland 2015
Philip R. Holland SAS Programming and Data Visualization Techniques 10.1007/978-1-4842-0568-6_1
1. The Basics of Efficient SAS Coding
Philip R. Holland 1
(1)
Hertfordshire, UK
Electronic supplementary material
The online version of this chapter (doi: 10.1007/978-1-4842-0568-6_1 ) contains supplementary material, which is available to authorized users.
Coding efficiency is generally measured in CPU time, disk space, or memory usage. This is perfectly reasonable for SAS code that will be submitted many more times than it will be updated. However, there are coding environments where SAS programs are written for single production runs and then adapted and updated for different production runsfor example, in clinical development. In these cases, a measurement of maintenance time may be more important.
SAS programs like those used in clinical trials are unlikely to be used to process large amounts of data, but they are very likely to be updated and adapted for use in a series of trials requiring similar processing. Saving 50% of the CPU time when the program runs for only 5 minutes will not have a significant impact on coding efficiency. But if a program is difficult to maintain, days or even weeks could be added to the time needed to prepare the program for a new trial.
This chapter discusses the choices you need to make when coding efficiently in different types of SAS programs. The various situations are illustrated with coding examples.
Is the SAS Programming World Back to Front?
I first used PROC SQL in financial projects; many of the SAS programmers had backgrounds in database management, and SQL was routinely used. In retrospect, this was not efficient programming, because joining large SAS data sets using PROC SQL , particularly on mainframes, does not usually improve processing performance.
When I started my first clinical-trials contract, no one used PROC SQL , even though data volumes were small and SQL is much easier to read and maintain than DATA steps and PROC SORT. DATA steps and PROC SORT together are much better for working with large data volumes, whereas PROC SQL is usually better for small data volumes.
The following examples reflect my personal views on coding efficiency. In some cases, the choice of an appropriate coding approach depends on the programming experience within the SAS programming teamparticularly their knowledge of SQL programming.
Speed and Low Maintenance
IF...THEN...ELSE and SELECT...WHEN constructs are examples of code that can be written to improve both speed and maintenance time. In a simple case of an input data set containing three possible values AC for a variable, the assignment of a new variable based on the value can be written a number of ways. All three examples generate exactly the same output data set:
The following code is not efficient, because every IF condition is applied to every record. However, for small input data sets, you may not notice the inherent inefficiency:
DATA new;
SET old;
IF oldvar = 'A' THEN newvar = 1;
IF oldvar = 'B' THEN newvar = 2;
IF oldvar = 'C' THEN newvar = 3;
RUN;
The following code is more efficient, because IF conditions are applied only up to the condition that matches. However, for small input data sets, you may not notice the increased speed. You can achieve further improvements in speed by ordering the IF conditions so that the most commonly used is placed at the top, but this may not be worthwhile unless the data is already well-known and the most common value is very common:
DATA new;
SET old;
IF oldvar = 'A' THEN newvar = 1;
ELSE IF oldvar = 'B' THEN newvar = 2;
ELSE IF oldvar = 'C' THEN newvar = 3;
RUN;
The following code is comparable in efficiency to the code in example 2 in that WHEN conditions are applied only up to the condition that matches. For small input data sets, you may not notice the increased speed. Again, you can achieve further improvements in speed by ordering the WHEN conditions so that the most commonly used is placed at the top. In my opinion, this construct is easier to maintain, because all the lines have the same layout; thus you can insert or delete lines with a reduced risk of introducing syntax errors. The mandatory OTHERWISE clause also provides an obvious place to include a default value if none of the previous conditions have been fulfilled:
DATA new;
SET old;
SELECT (oldvar);
WHEN ('A') newvar = 1;
WHEN ('B') newvar = 2;
WHEN ('C') newvar = 3;
OTHERWISE;
END;
RUN;
Extending conditional clauses to 10 or more conditions requires great care to avoid inefficient processing, especially if the input data set is large. You can also avoid inefficient maintenance, particularly if the conditional code is enclosed in a DO...END construct, if you lay out the code with indents indicating the relative positions of each section of conditional code.
Speed or Low Maintenance: Part 1
Rewriting a data-step merge with a PROC SQL join can help reduce maintenance time but may reduce processing speed. The following sample code merges three data sets using two variables and then reorders the resulting data set by another variable:
This is a combination of PROC SORT and DATA steps. The code is efficient as far as processing is concerned, but it is quite long and involved, because you have to sort the individual data sets prior to merging them:
PROC SORT DATA = a OUT = a1;
BY cat_b;
RUN;
PROC SORT DATA = b OUT = b1;
BY cat_b;
RUN;
DATA a1_b1;
MERGE a1 (IN = a) b1 (IN = b);
BY cat_b;
IF a AND b;
RUN;
PROC SORT DATA = a1_b1 OUT = a1_b11;
BY cat_c;
RUN;
PROC SORT DATA = c OUT = c1;
BY cat_c;
RUN;
DATA a1_b1_c1;
MERGE a1_b11 (IN = ab) c1 (IN = c);
BY cat_c;
IF ab AND c;
RUN;
PROC SORT DATA = a1_b1_c1;
BY cat_a cat_b cat_c;
RUN;
This is a single PROC SQL step that does everything in the one step, including the final sort. When input data sets are small to moderate in size, there is little difference in the CPU time used by this and the previous code, but very large input data sets can result in slower processing when using PROC SQL . Another obvious disadvantage is that, when combining two or more data sets with overlapping variables, you must list all the variables to be included in the output data sets. However, assuming the SAS programming team has some experience with SQL programming, this program should be easier to maintain:
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «SAS Programming and Data Visualization Techniques a Power Users Guide»

Look at similar books to SAS Programming and Data Visualization Techniques a Power Users Guide. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «SAS Programming and Data Visualization Techniques a Power Users Guide»

Discussion, reviews of the book SAS Programming and Data Visualization Techniques a Power Users Guide and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.