Get it together: Combining data with SAS MERGE, UPDATE, and SET Mel Widawski, MHW Consulting, Culver City, CA

Size: px
Start display at page:

Download "Get it together: Combining data with SAS MERGE, UPDATE, and SET Mel Widawski, MHW Consulting, Culver City, CA"

Transcription

1 Get it together: Combining data with SAS MERGE, UPDATE, and SET Mel Widawski, MHW Consulting, Culver City, CA ABSTRACT Combining data sets is easy with Merge, Update or using the SET statements. You will learn when to do each and how they are different. Simple examples illustrate the results of combining data sets. Pitfalls will also be discussed. INTRODUCTION There are a number of ways to combine data in SAS and this paper will cover a few of the most common methods. The first thing you must determine is how you want the data to be combined. Are you adding cases, bringing in additional variables, correcting data, changing specific values, or performing table look-ups. This paper will be organized by function. This paper deals with combining data in the DATA step using SET, MERGE, and UPDATE statements. In addition there will be a discussion of the uses of the BY statement where appropriate. SET is used primarily for adding cases, but it also can be used to propagate variables across an entire file. MERGE will combine two or more files that have the same cases and different variables. It can also be used for updating values when you wish to force a change regardless of the new value. UPDATE performs much the same function as merge with two exceptions: 1) Only two data sets can be combined, and 2) if a value is missing in the update data set the value is not changed in the target data set. In addition a BY statement is used in combination with SET to interleave lines of data, and with MERGE and UPDATE to assure the appropriate lines are combined. The paper will also discuss labeling the source of the case through the use of the IN= data set option, and performing table look-ups with the KEY= option on SET statement. This will be the most complex example in this presentation. In order to be able to use the KEY= option the table look-up data set must have indexes stored with the data set. There are some useful techniques available in SQL for joining data sets, but they will not be covered in this paper. COMBINING CASES As mentioned previously the SET statement is used for combining cases. Cases or lines of data can be added to the end of another file, or they can be interleaved and ordered through the use of a variable that determines the order. ADDING CASES TO THE END OF A FILE This is one of the simplest tasks to perform, and uses statements you will be familiar with if you ever read a SAS data set in a data step. The only difference is that more than one data set is named on the SET statement. Assume that you have the following data set: DATA TEST01; INPUT ID v2 v3 v4; CARDS; The values in the body have been set to one so that the additional cases will be easily distinguished from the original. The data are included in a data step which will read the data into a SAS data set. The data set you want to add.to this is presented in the following data step: DATA TEST02a; INPUT ID v2 v3 v4; CARDS;

2 Naming both data sets on the same SET statement in the following data step combines the files one after another: DATA test11; SET test01 test02a ; The resulting file, TEST11, produced with a PROC PRINT statement follows: SET: Adding Lines Of Data Obs ID v2 v3 v The the additional lines of data are highlighted.. While it is possible to combine two data sets where only some of the variables are in both, it usually works best if all of the variables are the same in both files. Large areas of missing values may be created if only some of the variables in the files being combined are the same. INTERLEAVINGG CASES IN TWO FILES Many times it would be convenient to have the cases in the new data set ordered by some variable (usually ID). This can be accomplished by using PROC SORT after combining the data sets. If the data sets are already ordered by a variable, then it is easy to maintain that order in the resulting data set. This can be accomplished by including a by statement after the SET statement. In the following example the same data sets used previously will be combined. Adding a BY statement to the program we used above will maintain the order by ID: DATA TEST12; SET test01 test02a ; The resulting file, TEST12, produced with a PROC PRINT statement follows: Obs ID v2 v3 v The additional lines of data are bolded, and appear interspersed according to ID. Remember that in order for this to work the files must have be ordered by the variable of interest. INDICATING THE SOURCE FILE IN THE INTERLEAVED FILES It would be helpful to be able to determine when looking at a combined file later, which of the original files produced the line of data. Adding the data set option, IN= to the SET statement in the program we used above will provide information on the source of the data: DATA TEST13; SET test01 (IN=in1) test02a (IN=in2a); in01 =in1; in02a =in2a; Notice that in addition to creating IN1 and IN2A using the IN= data step option, we also set two addition variables IN01 and IN02A equal to them in an assignment statement. The variables created by using IN= are temporary variables only available during the data step. In order to have the information saved in the file for future use, new permanent variables must be created. 2

3 The resulting file, TEST13, produced with a PROC PRINT statement follows: Obs ID v2 v3 v4 in01 in02a The additional lines of data are bolded, and appear interspersed according to ID. The new variables indicating the source of the line is also in bold type. Since no line of data, in this example, can receive input from more than one file a single variable would be sufficient to indicate source. This may be accomplished with the following modification to the data step: DATA TEST13a; SET test01 (IN=in1) test02a; length source $8; IF in1=1 THEN source= test01 ; ELSE source= test02a ; The length statement is necessary because the first IF statement creates a variable with less characters than the subsequent if statement. If it is not included the final a in test02a would be missing resulting in test02. File 13a is the result of running this program: Obs ID v2 v3 v4 source test test test02a test test test test02a test test test test02a WHEN THE VARIABLES DO NOT MATCH The presence of different variables in each file yields strange results. Large areas of missing values can result. The following program creates a data set with the new variables v5, v6 and v7: DATA TEST02; INPUT ID v5 v6 v7; The program that combines the data sets is almost Identical to the previous program: DATA TEST14; Set test01 (in=in1) test02 (in=in2) ; by id; in01 =in1; in02 =in2; The resulting file will contain seven variables instead of four, and the values of the set from one file will be missing on lines of data that come from the other file. In this example none of the variables match. 3

4 File 14 is the result of running this program: Obs ID v2 v3 v4 v5 v6 v7 in01 in This is usually not the desired result when the data sets you wish to combine have the same id s and different variables. Usually in this case you want to add the variables to the existing cases. This is discussed in the section on adding variables that follows. MERGING FILES AND ADDING VARIABLES Combining files by merging additional variables from different sources is one of the most common tasks. For example merging demographic data with questionnaire or laboratory data. In order to do this there must be a variable to match the observations in each file. The files should be in ordered by this variable. A one to one match is most common. If there is no information to match with an observation in one file then missing values are generated for the variables from that file. It is also possible to add information from one file to each case with the same key variable value in another file. This is called a table look-up. Strange results are generated if the files both have multiple records with the same values on the key variables. ONE TO ONE MERGING A one to one merge implies that there is at most one case in each file with a given value on the variable used for matching. The following program performs this operation on the files presented above: DATA TEST03; MERGE test01 test02; This produces the following file: Obs ID v2 v3 v4 v5 v6 v Notice that there was information to be added only to cases with the ID s 2, 5, and 8. Missing values were generated for cases not in the TEST02 data set. SIMPLE TABLE LOOKUPS Table look-ups involve a single file that may contain information on a group that needs to be included with the information for each person in the group. Oor information for a person that needs to be spread to each time period record. Assume the following data set with a group identifier GP: DATA test01b; INPUT ID GP v3 v4;

5 PROC SORT DATA=test01B OUT=test01BS; BY gp id; Notice that the data set is not in order by group so it is necessary to sort it with PROC SORT. The following data set contains information on each group that needs to be spread to each appropriate record above: DATA test02i; INPUT GP ID v6 v7; GP2=GP; The merge statement can be used to accomplish this task just as it did for the one to one matching problem: DATA TEST17; MERGE test01bs test02i; BY gp; The data set produced by this process follows: Obs ID GP v3 v4 v6 v7 GP Notice that information from the second data set is spread to each case with the same group designation in the first data set..this is also known as a one to many match. TABLE LOOK-UP A VARIATION Sometimes it is useful to calculate summary statistics for groups and propagate them to each record for that group. The look-up data set can be created in PROC MEANS and then spread to the members of the group from the original data set. The following PROC MEANS calculates means for each group, GP: PROC MEANS DATA=TEST01bs; BY GP; VAR V3 V4; OUTPUT OUT=TEST01bsm MEAN( V3 V4)= M3 M4; The OUTPUT statement creates the new SAS data set, test01bsm, containing the calculated means for each group. The BY statement specifies that each groups means should be calculated separately. The following data set was produced by the PROC above: Obs GP _TYPE FREQ_ M3 M Two automatic variables were produced by PROC MEANS, they are _TYPE_ and _FREQ_. The first is irrelevant for this example, and _FREQ_ contains the number of cases in the group. The table look-up is accomplished as in the previous example. The merge statement can be used to accomplish this task just as it did for the one to one matching problem: DATA TEST17b; MERGE test01bs test01bsm; BY gp; DROP _type_; RENAME _freq_=n; The DROP statement eliminates _TYPE_ from the new data set, and the RENAME statement changes the name of _FREQ_ to N. 5

6 The data set produced by this process follows: Obs ID GP v3 v4 N M3 M Notice that means from the second data set is spread to each case with the same group designation in the first data set. MULTIPLE RECORDS WITH THE SAME GROUP IN BOTH FILES As mentioned earlier, merging data sets with more than one record with the same value of the matching variable in both files yields strange results. The group data set below contains multiple records for groups: DATA test02k; INPUT GP v6 v7; GP2=GP; The following program merges the two data sets: DATA TEST19; MERGE test01bs test02k; BY gp; The data set produced by this merge follows: Obs ID GP v3 v4 v6 v7 GP Notice that the first group 1 record in the group data set (test02k) is attached to the first group 1 record in the main data set (test01bs). The second group record is propagated to the remaining two observations in the main data set. The same result occurs for the 3 rd group. This would generally not be the desired result. CHANGING THE VALUES OF EXISTING VARIABLES Rather than changing the data directly in a data set, entering the new data in separate data sets and then using the new data set to update the data provides a record of the changes. It also enables reverting to the original values. FORCING CHANGES WITH MERGE When the transaction (second) data set contains the same variables as the main data set then and MERGE is used to combine the data sets, then the value of any matching variable in the transaction data set replaces the value of the matching variable in the main file for the matching line of data. The main data set for this example is test01presented below again to aid in observing the modifications: DATA TEST01; INPUT ID v2 v3 v4; CARDS;

7 The following program creates the transaction data set: DATA TEST02b; INPUT ID v2 v3 v4; The missing values in this transaction data set will be propagated to the new main data set. Using merge forces the change regardless of whether there is a valid or a missing value. The following program performs this operation on the files presented above: DATA TEST03; MERGE test01 test02; This produces the following file: Obs ID v2 v3 v Notice that the the value was changed even if the value in the transaction data set was missing. CONDITIONAL CHANGES WITH UPDATE When the transaction (second) data set contains the same variables as the main data set then and UPDATE is used to combine the data sets, then the valid values of any matching variable in the transaction data set replaces the value of the matching variable in the main file for the matching line of data. Missing values in the transaction data set do not replace values in the main data set. The following program performs this operation on the files presented above: DATA TEST03; UPDATE test01 test02; This produces the following file: Obs ID v2 v3 v Notice that the the value was changed only if the value in the transaction data set was not missing. This allows using a transaction data set that contains all variables even if some of the values do not need to be changed for some of the lines of data. The two primary differences between UPDATE and MERGE are that UPDATE never replaces a value in the main data set with a missing value from the transaction data set, and only two data sets may be used on the UPDATE statement. MULTIPLE TRANSACTION DATA SETS When only a few changes are to be made at a time for only a small number of cases and variables then it may be more convenient to use multiple transaction data sets, one for each variable that needs updating. This example still uses test01 as the primary data set. 7

8 Assume the following transaction data sets for each variable containing only values to be updated: DATA TEST02e; INPUT ID v3 ; DATA TEST02f; INPUT ID v4; Each data set contains only values that need to be changed, but more transaction files are needed. The merge statement can be used to accomplish this task but more than two data sets are specified: DATA TEST09; Merge test01 test02e test02f test02g; by id; The data set produced by this process follows: Obs ID v2 v3 v All values for variables in the transaction data sets replace the value for that variable and case in the primary data set, but if there is no value listed in the transaction data set for that case and variable then no change is made. UPDATE WITH ADDITIONAL VARIABLES AND CASES IN THE TRANSACTION FILE Variables and case can be added using the transaction file, but if the variable or case has no entry in that file missing values will be created. The following data set contains an additional variable not in the original data set (v5), and an additional observation (9): DATA TEST02bx; INPUT ID v2 v3 v4 v5; The update statement can be used to accomplish this task: DATA TEST06b; update test01 test02bx; 8

9 The data set produced by this process follows: Obs ID v2 v3 v4 v Non-missing values in the transaction data set replace the values appropriate values in the primary data set. New variables (v5) in the transaction data set are added to the new data set, but missing values for this variable are created for those cases not in the transaction data set. Similarly new cases (9) may be added to the file from the transaction data set, but any variable not in the transaction data set is set to missing for the new case. PROPAGATING VALUES OF NEW VARIABLES TO EVERY CASE Some times it is necessary to propagate the values of a group of new variables to every line of data. This can be accomplished by including an assignment statement for each of these variables, but if the number of variables is large this method can be cumbersome. If the values of these new variables are already in a file It would be advantageous to use this file. One way to accomplish this task is as a table look-up, but modifications must be made to the files. First create a new variable in the primary file with a value of one for all of the cases. Next create that same variable with a value of one in the single line look-up file. Then merge the two files by that new constant variable. There is another way to do this without creating the new constant variable. This technique uses multiple SET statements, and makes use of the fact that the values of the variables brought in by one SET statement are retained until the next case is read from that file. PROPAGATING VALUES WITH SET If you have a multi-line file and a file of new variables that needs to be spread to each record in the original file, values can be propagated by bringing in each record of the primary file with a SET statement, and bringing in the single line file only once with a separate SET statement. First look at test01 in the data step below: DATA TEST01; INPUT ID v2 v3 v4; This is the primary data set for this example.the following data set contains the new variables which need to be spread across the records of the primary data set: DATA TEST02h; INPUT v5 v6 v7; The IF statement in the program below insures that the single line data set is read only once. It makes use of the automatic temporary variable _N_ which is created to number the observations in the data set. It will equal one only for the first line of data in test01. When using separate SET statements remember that the values of all of the variables named on that SET statement are retained until reset by a subsequent invocation of that SET statement. The following program demonstrates this concept: DATA TEST15; Set TEST01 ; IF _N_=1 THEN SET TEST02h; 9

10 The data set produced by this process follows: Obs ID v2 v3 v4 v5 v6 v Notice the values of (5 6 7) of the variables v5, v6, and v7 in the test02h data set are propagated to all of the cases in the test01 data set. This feature of the SET statement allows for great control over combining files. COMPLEX TABLE LOOK-UPS WITH SET There are a variety of uses for complex table look-ups that cannot be easily done with simple merges. The feature discussed above of multiple SET statements for propagating values when combined with the KEY= feature of the SET statement is provides a very powerful tool. The following scoring task can be accomplished through brute force with cumbersome programs, but this method is rather simple and has the advantage of being easily expanded. TEST SCORING TABLE LOOK-UP EXAMPLE Assume that a test is being administered where each item is scored according to a scoring key that is provided. The scoring key contains the question number, the code that matches the response, a score assigned for that code on that question. The following data step reads in the test responses and sets up the main data set: DATA main (index=(id )); /**** create indexes ***/ INPUT id Q1 $ Q2 $ Q3 $ ; n2=_n_; CARDS; 5 a b e 6 c d b 8 c b a 9 d a b 10 a a e Notice the INDEX= data set option. This option can be used in lieu of sorting the file to create a sort order. The advantage over sort is that multiple sort orders can be imposed on the same data set at the same time, without constant resorting. The following data set contains the scoring key: DATA scoring (index=(qc=(q code))); /**** create level3 and keys ***/ INPUT Q code $ score; n2=_n_; CARDS; 1 a 1 1 b 2 1 c 3 1 d 4 2 a 4 2 b 3 2 c 2 2 d 1 3 a 1 3 b 2 3 c 3 3 d 4 proc print; run; Notice the complex index (qc) is created for this file. The index created will allow access to the file by combined variables Q and code. The appropriate record will be brought in during a data step according to the values of those two variables when the set is keyed on qc. 10

11 In the following program the scoring key is consulted for each item for each individual: DATA scored ; SET main ; /**** select cases from master ***/ ARRAY qarray (q) q1-q3; ARRAY scarray (q) sc1-sc3; DO OVER qarray; code=qarray; SET scoring key=qc / unique; /**** select level3 cases w/key***/ IF _error_=1 THEN DO; /**** error = score not found ***/ scarray=.; PUT 'Score Not found ' id= Q= code= ; _error_=0; END; ELSE DO; scarray=score; END; END; OUTPUT; DROP score q code; Notice that the questions and the scoring variables are arrayed with the variable q referring to the respective question and score. When looping through the array the first question Q1 is referenced when Q=1. The DO loop progresses through the questions in the scale for each case. Setting the variable code equal to the value of the current array element sets up the other variable needed for accessing the score. A SET statement for the scoring data set is invoked with the KEY= operand and the UNIQUE option. The appropriate record from the scoring data set is brought in based on question number and response and the new variable score holds the scoring for that response. Placing the value in the scoring array (SCARRAY) keeps it available for writing the file when the score of the next question is input. The UNIQUE option directs SAS to start at the beginning of the file when searching for a case in the look-up file that matches the KEY. The data set produced by this process follows: Obs id Q1 sc1 Q2 sc2 Q3 sc3 1 5 a 1 b 3 e. 2 6 c 3 d 1 b c 3 b 3 a d 4 a 4 b a 1 a 4 e. In printing this data set the response variables and scoring variables were alternated for ease of reading. This method of scoring allows for scores that are not simple reversals. If the instrument is increased by adding more questions, once the scoring key is expanded only the arrays need to be increased by adding the new questions and scoring variables for the program to continue working. It is possible to use a macro variable for providing the ending question and scoring variable number for easy expansion of this program to handle larger questionnaires Additionally, this technique can be used when there are various records to be combined each keyed on their own variable. For example, a clinical data base that has patient information, visit information based on patient ID and visit number, surgery records, laboratory records, each keyed on their own variables. CONCLUSION In conclusion, there are a variety of ways of combining data in SAS. Usually one of a small number of statements in the data step suffice. These statements are SET, MERGE, and UPDATE. SET is usually used for adding observations to a file, but can be used for propagating values and complex table lookups. If more than one SET statement is used then the values of variables unique to that SET statement are retained as the data set loops through the other file. Using the KEY=operand on the SET statement looks up records in the data set based on the value of the key variable or variables. This requires that the data set be indexed. MERGE is used to combine files with different variables, for simple table look-ups and for updating values when the new value is to replace the old even if the new value is missing. More that two data sets may be merged on a single statement. UPDATE is used for updating values when only with new valid values. Only two data sets may be used on an update statement. To order the case for combining use PROC SORT or create indexes with the INDEX= data set option on the DATA statement. Beware of trying to match files where each file contains multiple case with the same value of the by variable. 11

12 Recapping what you have learned; the following table lists the functions, sub-tasks, statements needed, and variations. FUNCTION SUB-TASK PRIMARY STATEMENTS SECONDARY STATEMENTS REQUIRED CONDITIONS adding cases to the end of the file DATA, SET The same variables in each file. Interleaving lines of data DATA, SET BY Ditto, Plus Sorted on the same variable. Combining files with the same cases and additional variables DATA, MERGE BY Sorted on the same ID variable. Other variables have different names in the two files Making data corrections Propagating values Table Look-ups Forcing corrections DATA, MERGE BY Sorted on the same ID variable. Other variables have different names in the two files Selective corrections Selective corrections and additions From one file to all of the cases of the other file Adding computed stats to each case A simple one to many merge DATA, UPDATE BY Sorted on the same ID variable. Other variables have different names in the two files DATA, UPDATE BY Sorted on the same ID variable. Other variables have different names in the two files, can contain additional lines of data and variables DATA, SET, SET IF _N_=1 One line of data in the file read by the conditional set. DATA, SET, SET, PROC MEAN IF _N_=1 One line of data in the file read by the conditional set. DATA, MERGE BY One file has unique values on the BY variable Complex DATA, SET, SET DO, ARRAY KEY= option CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Mel Widawski MHW Consulting 5281 Dobson Way Culver City CA Work Phone: (310) mel@ucla.edu Indexing the look-up file. The look-up file must have unique values of the key variables SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies. 12

Labels, Labels, and More Labels Stephanie R. Thompson, Rochester Institute of Technology, Rochester, NY

Labels, Labels, and More Labels Stephanie R. Thompson, Rochester Institute of Technology, Rochester, NY Paper FF-007 Labels, Labels, and More Labels Stephanie R. Thompson, Rochester Institute of Technology, Rochester, NY ABSTRACT SAS datasets include labels as optional variable attributes in the descriptor

More information

Paper 109-25 Merges and Joins Timothy J Harrington, Trilogy Consulting Corporation

Paper 109-25 Merges and Joins Timothy J Harrington, Trilogy Consulting Corporation Paper 109-25 Merges and Joins Timothy J Harrington, Trilogy Consulting Corporation Abstract This paper discusses methods of joining SAS data sets. The different methods and the reasons for choosing a particular

More information

Table Lookups: From IF-THEN to Key-Indexing

Table Lookups: From IF-THEN to Key-Indexing Paper 158-26 Table Lookups: From IF-THEN to Key-Indexing Arthur L. Carpenter, California Occidental Consultants ABSTRACT One of the more commonly needed operations within SAS programming is to determine

More information

C H A P T E R 1 Introducing Data Relationships, Techniques for Data Manipulation, and Access Methods

C H A P T E R 1 Introducing Data Relationships, Techniques for Data Manipulation, and Access Methods C H A P T E R 1 Introducing Data Relationships, Techniques for Data Manipulation, and Access Methods Overview 1 Determining Data Relationships 1 Understanding the Methods for Combining SAS Data Sets 3

More information

The Program Data Vector As an Aid to DATA step Reasoning Marianne Whitlock, Kennett Square, PA

The Program Data Vector As an Aid to DATA step Reasoning Marianne Whitlock, Kennett Square, PA PAPER IN09_05 The Program Data Vector As an Aid to DATA step Reasoning Marianne Whitlock, Kennett Square, PA ABSTRACT The SAS DATA step is easy enough for beginners to produce results quickly. You can

More information

Taming the PROC TRANSPOSE

Taming the PROC TRANSPOSE Taming the PROC TRANSPOSE Matt Taylor, Carolina Analytical Consulting, LLC ABSTRACT The PROC TRANSPOSE is often misunderstood and seldom used. SAS users are unsure of the results it will give and curious

More information

Paper 2917. Creating Variables: Traps and Pitfalls Olena Galligan, Clinops LLC, San Francisco, CA

Paper 2917. Creating Variables: Traps and Pitfalls Olena Galligan, Clinops LLC, San Francisco, CA Paper 2917 Creating Variables: Traps and Pitfalls Olena Galligan, Clinops LLC, San Francisco, CA ABSTRACT Creation of variables is one of the most common SAS programming tasks. However, sometimes it produces

More information

Programming Idioms Using the SET Statement

Programming Idioms Using the SET Statement Programming Idioms Using the SET Statement Jack E. Fuller, Trilogy Consulting Corporation, Kalamazoo, MI ABSTRACT While virtually every programmer of base SAS uses the SET statement, surprisingly few programmers

More information

The SET Statement and Beyond: Uses and Abuses of the SET Statement. S. David Riba, JADE Tech, Inc., Clearwater, FL

The SET Statement and Beyond: Uses and Abuses of the SET Statement. S. David Riba, JADE Tech, Inc., Clearwater, FL The SET Statement and Beyond: Uses and Abuses of the SET Statement S. David Riba, JADE Tech, Inc., Clearwater, FL ABSTRACT The SET statement is one of the most frequently used statements in the SAS System.

More information

Programming Tricks For Reducing Storage And Work Space Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA.

Programming Tricks For Reducing Storage And Work Space Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA. Paper 23-27 Programming Tricks For Reducing Storage And Work Space Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA. ABSTRACT Have you ever had trouble getting a SAS job to complete, although

More information

USING PROCEDURES TO CREATE SAS DATA SETS... ILLUSTRATED WITH AGE ADJUSTING OF DEATH RATES 1

USING PROCEDURES TO CREATE SAS DATA SETS... ILLUSTRATED WITH AGE ADJUSTING OF DEATH RATES 1 USING PROCEDURES TO CREATE SAS DATA SETS... ILLUSTRATED WITH AGE ADJUSTING OF DEATH RATES 1 There may be times when you run a SAS procedure when you would like to direct the procedure output to a SAS data

More information

PharmaSUG 2015 - Paper QT26

PharmaSUG 2015 - Paper QT26 PharmaSUG 2015 - Paper QT26 Keyboard Macros - The most magical tool you may have never heard of - You will never program the same again (It's that amazing!) Steven Black, Agility-Clinical Inc., Carlsbad,

More information

Transforming SAS Data Sets Using Arrays. Introduction

Transforming SAS Data Sets Using Arrays. Introduction Transforming SAS Data Sets Using Arrays Ronald Cody, Ed.D., Robert Wood Johnson Medical School, Piscataway, NJ Introduction This paper describes how to efficiently transform SAS data sets using arrays.

More information

Foundations & Fundamentals. A PROC SQL Primer. Matt Taylor, Carolina Analytical Consulting, LLC, Charlotte, NC

Foundations & Fundamentals. A PROC SQL Primer. Matt Taylor, Carolina Analytical Consulting, LLC, Charlotte, NC A PROC SQL Primer Matt Taylor, Carolina Analytical Consulting, LLC, Charlotte, NC ABSTRACT Most SAS programmers utilize the power of the DATA step to manipulate their datasets. However, unless they pull

More information

Emailing Automated Notification of Errors in a Batch SAS Program Julie Kilburn, City of Hope, Duarte, CA Rebecca Ottesen, City of Hope, Duarte, CA

Emailing Automated Notification of Errors in a Batch SAS Program Julie Kilburn, City of Hope, Duarte, CA Rebecca Ottesen, City of Hope, Duarte, CA Emailing Automated Notification of Errors in a Batch SAS Program Julie Kilburn, City of Hope, Duarte, CA Rebecca Ottesen, City of Hope, Duarte, CA ABSTRACT With multiple programmers contributing to a batch

More information

Paper 70-27 An Introduction to SAS PROC SQL Timothy J Harrington, Venturi Partners Consulting, Waukegan, Illinois

Paper 70-27 An Introduction to SAS PROC SQL Timothy J Harrington, Venturi Partners Consulting, Waukegan, Illinois Paper 70-27 An Introduction to SAS PROC SQL Timothy J Harrington, Venturi Partners Consulting, Waukegan, Illinois Abstract This paper introduces SAS users with at least a basic understanding of SAS data

More information

A Many to Many Merge, Without SQL? Paper TU05

A Many to Many Merge, Without SQL? Paper TU05 A Many to Many Merge, Without SQL? Paper TU05 David Franklin Independent SAS Consultant TheProgrammersCabin.com While you are waiting, some trivia. The first U.S. Transcontinental Flight took 84 days,

More information

B) Mean Function: This function returns the arithmetic mean (average) and ignores the missing value. E.G: Var=MEAN (var1, var2, var3 varn);

B) Mean Function: This function returns the arithmetic mean (average) and ignores the missing value. E.G: Var=MEAN (var1, var2, var3 varn); SAS-INTERVIEW QUESTIONS 1. What SAS statements would you code to read an external raw data file to a DATA step? Ans: Infile and Input statements are used to read external raw data file to a Data Step.

More information

Symbol Tables. Introduction

Symbol Tables. Introduction Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The

More information

Effective Use of SQL in SAS Programming

Effective Use of SQL in SAS Programming INTRODUCTION Effective Use of SQL in SAS Programming Yi Zhao Merck & Co. Inc., Upper Gwynedd, Pennsylvania Structured Query Language (SQL) is a data manipulation tool of which many SAS programmers are

More information

From The Little SAS Book, Fifth Edition. Full book available for purchase here.

From The Little SAS Book, Fifth Edition. Full book available for purchase here. From The Little SAS Book, Fifth Edition. Full book available for purchase here. Acknowledgments ix Introducing SAS Software About This Book xi What s New xiv x Chapter 1 Getting Started Using SAS Software

More information

Data management and SAS Programming Language EPID576D

Data management and SAS Programming Language EPID576D Time: Location: Tuesday and Thursdays, 11:00am 12:15 pm Drachman Hall A319 Instructors: Angelika Gruessner, MS, PhD 626-3118 (office) Drachman Hall A224 acgruess@azcc.arizona.edu Office Hours: Monday Thursday

More information

2: Entering Data. Open SPSS and follow along as your read this description.

2: Entering Data. Open SPSS and follow along as your read this description. 2: Entering Data Objectives Understand the logic of data files Create data files and enter data Insert cases and variables Merge data files Read data into SPSS from other sources The Logic of Data Files

More information

KEYWORDS ARRAY statement, DO loop, temporary arrays, MERGE statement, Hash Objects, Big Data, Brute force Techniques, PROC PHREG

KEYWORDS ARRAY statement, DO loop, temporary arrays, MERGE statement, Hash Objects, Big Data, Brute force Techniques, PROC PHREG Paper BB-07-2014 Using Arrays to Quickly Perform Fuzzy Merge Look-ups: Case Studies in Efficiency Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT Merging two data sets when

More information

LOCF-Different Approaches, Same Results Using LAG Function, RETAIN Statement, and ARRAY Facility Iuliana Barbalau, ClinOps LLC. San Francisco, CA.

LOCF-Different Approaches, Same Results Using LAG Function, RETAIN Statement, and ARRAY Facility Iuliana Barbalau, ClinOps LLC. San Francisco, CA. LOCF-Different Approaches, Same Results Using LAG Function, RETAIN Statement, and ARRAY Facility Iuliana Barbalau, ClinOps LLC. San Francisco, CA. ABSTRACT LOCF stands for Last Observation Carried Forward

More information

Intro to Longitudinal Data: A Grad Student How-To Paper Elisa L. Priest 1,2, Ashley W. Collinsworth 1,3 1

Intro to Longitudinal Data: A Grad Student How-To Paper Elisa L. Priest 1,2, Ashley W. Collinsworth 1,3 1 Intro to Longitudinal Data: A Grad Student How-To Paper Elisa L. Priest 1,2, Ashley W. Collinsworth 1,3 1 Institute for Health Care Research and Improvement, Baylor Health Care System 2 University of North

More information

The SAS Data step/macro Interface

The SAS Data step/macro Interface Paper TS09 The SAS Data step/macro Interface Lawrence Heaton-Wright, Quintiles, Bracknell, Berkshire, UK ABSTRACT The SAS macro facility is an extremely useful part of the SAS System. However, macro variables

More information

Everything you wanted to know about MERGE but were afraid to ask

Everything you wanted to know about MERGE but were afraid to ask TS- 644 Janice Bloom Everything you wanted to know about MERGE but were afraid to ask So you have read the documentation in the SAS Language Reference for MERGE and it still does not make sense? Rest assured

More information

Reshaping & Combining Tables Unit of analysis Combining. Assignment 4. Assignment 4 continued PHPM 672/677 2/21/2016. Kum 1

Reshaping & Combining Tables Unit of analysis Combining. Assignment 4. Assignment 4 continued PHPM 672/677 2/21/2016. Kum 1 Reshaping & Combining Tables Unit of analysis Combining Reshaping set: concatenate tables (stack rows) merge: link tables (attach columns) proc summary: consolidate rows proc transpose: reshape table Hye-Chung

More information

Direct Marketing Profit Model. Bruce Lund, Marketing Associates, Detroit, Michigan and Wilmington, Delaware

Direct Marketing Profit Model. Bruce Lund, Marketing Associates, Detroit, Michigan and Wilmington, Delaware Paper CI-04 Direct Marketing Profit Model Bruce Lund, Marketing Associates, Detroit, Michigan and Wilmington, Delaware ABSTRACT A net lift model gives the expected incrementality (the incremental rate)

More information

REx: An Automated System for Extracting Clinical Trial Data from Oracle to SAS

REx: An Automated System for Extracting Clinical Trial Data from Oracle to SAS REx: An Automated System for Extracting Clinical Trial Data from Oracle to SAS Edward McCaney, Centocor Inc., Malvern, PA Gail Stoner, Centocor Inc., Malvern, PA Anthony Malinowski, Centocor Inc., Malvern,

More information

Alternative Methods for Sorting Large Files without leaving a Big Disk Space Footprint

Alternative Methods for Sorting Large Files without leaving a Big Disk Space Footprint Alternative Methods for Sorting Large Files without leaving a Big Disk Space Footprint Rita Volya, Harvard Medical School, Boston, MA ABSTRACT Working with very large data is not only a question of efficiency

More information

Let SAS Modify Your Excel File Nelson Lee, Genentech, South San Francisco, CA

Let SAS Modify Your Excel File Nelson Lee, Genentech, South San Francisco, CA ABSTRACT PharmaSUG 2015 - Paper QT12 Let SAS Modify Your Excel File Nelson Lee, Genentech, South San Francisco, CA It is common to export SAS data to Excel by creating a new Excel file. However, there

More information

Changing the Shape of Your Data: PROC TRANSPOSE vs. Arrays

Changing the Shape of Your Data: PROC TRANSPOSE vs. Arrays Changing the Shape of Your Data: PROC TRANSPOSE vs. Arrays Bob Virgile Robert Virgile Associates, Inc. Overview To transpose your data (turning variables into observations or turning observations into

More information

Encoding the Password

Encoding the Password SESUG 2012 Paper CT-28 Encoding the Password A low maintenance way to secure your data access Leanne Tang, National Agriculture Statistics Services USDA, Washington DC ABSTRACT When users access data in

More information

Subsetting Observations from Large SAS Data Sets

Subsetting Observations from Large SAS Data Sets Subsetting Observations from Large SAS Data Sets Christopher J. Bost, MDRC, New York, NY ABSTRACT This paper reviews four techniques to subset observations from large SAS data sets: MERGE, PROC SQL, user-defined

More information

Generic Automated Data Dictionary for Any SAS DATA Set or Format Library Dale Harrington, Kaiser Permanente, Oakland, CA

Generic Automated Data Dictionary for Any SAS DATA Set or Format Library Dale Harrington, Kaiser Permanente, Oakland, CA Generic Automated Data Dictionary for Any SAS DATA Set or Format Library Dale Harrington, Kaiser Permanente, Oakland, CA ABSTRACT This paper explains how to create an automated data dictionary which will

More information

SET The SET statement is often used in two ways copying and appending.

SET The SET statement is often used in two ways copying and appending. Point, Set, Match (Merge) A Beginner s Lesson Jennifer Hoff Lindquist, Institute for Clinical and Epidemiologic Research, Veterans Affairs Medical Center, Durham, NC The phrase Point, Set and Match is

More information

Beginning Tutorials. Web Publishing in SAS Software. Prepared by. International SAS Training and Consulting A SAS Institute Quality Partner

Beginning Tutorials. Web Publishing in SAS Software. Prepared by. International SAS Training and Consulting A SAS Institute Quality Partner Web Publishing in SAS Software Prepared by International SAS Training and Consulting A SAS Institute Quality Partner 100 Great Meadow Rd, Suite 601 Wethersfield, CT 06109-2379 Phone: (860) 721-1684 1-800-7TRAINING

More information

Introduction to Proc SQL Steven First, Systems Seminar Consultants, Madison, WI

Introduction to Proc SQL Steven First, Systems Seminar Consultants, Madison, WI Paper #HW02 Introduction to Proc SQL Steven First, Systems Seminar Consultants, Madison, WI ABSTRACT PROC SQL is a powerful Base SAS Procedure that combines the functionality of DATA and PROC steps into

More information

Introduction to Proc SQL Katie Minten Ronk, Systems Seminar Consultants, Madison, WI

Introduction to Proc SQL Katie Minten Ronk, Systems Seminar Consultants, Madison, WI Paper 268-29 Introduction to Proc SQL Katie Minten Ronk, Systems Seminar Consultants, Madison, WI ABSTRACT PROC SQL is a powerful Base SAS Procedure that combines the functionality of DATA and PROC steps

More information

Coding for Posterity

Coding for Posterity Coding for Posterity Rick Aster Some programs will still be in use years after they are originally written; others will be discarded. It is not how well a program achieves its original purpose that makes

More information

Fourth generation techniques (4GT)

Fourth generation techniques (4GT) Fourth generation techniques (4GT) The term fourth generation techniques (4GT) encompasses a broad array of software tools that have one thing in common. Each enables the software engineer to specify some

More information

Q1. Where else, other than your home, do you use the internet? (Check all that apply). Library School Workplace Internet on a cell phone Other

Q1. Where else, other than your home, do you use the internet? (Check all that apply). Library School Workplace Internet on a cell phone Other Exploring Check-All Questions: Frequencies, Multiple Response, and Aggregation Target Software & Version: SPSS v19 Last Updated on May 4, 2012 Created by Laura Atkins Sometimes several responses or measurements

More information

Integrating Data and Business Rules with a Control Data Set in SAS

Integrating Data and Business Rules with a Control Data Set in SAS Paper 3461-2015 Integrating Data and Business Rules with a Data Set in SAS Edmond Cheng, CACI International Inc. ABSTRACT In SAS software development, data specifications and process requirements can be

More information

Forms Printer User Guide

Forms Printer User Guide Forms Printer User Guide Version 10.51 for Dynamics GP 10 Forms Printer Build Version: 10.51.102 System Requirements Microsoft Dynamics GP 10 SP2 or greater Microsoft SQL Server 2005 or Higher Reporting

More information

The Essentials of Finding the Distinct, Unique, and Duplicate Values in Your Data

The Essentials of Finding the Distinct, Unique, and Duplicate Values in Your Data The Essentials of Finding the Distinct, Unique, and Duplicate Values in Your Data Carter Sevick MS, DoD Center for Deployment Health Research, San Diego, CA ABSTRACT Whether by design or by error there

More information

Instant Interactive SAS Log Window Analyzer

Instant Interactive SAS Log Window Analyzer ABSTRACT Paper 10240-2016 Instant Interactive SAS Log Window Analyzer Palanisamy Mohan, ICON Clinical Research India Pvt Ltd Amarnath Vijayarangan, Emmes Services Pvt Ltd, India An interactive SAS environment

More information

What You re Missing About Missing Values

What You re Missing About Missing Values Paper 1440-2014 What You re Missing About Missing Values Christopher J. Bost, MDRC, New York, NY ABSTRACT Do you know everything you need to know about missing values? Do you know how to assign a missing

More information

Chapter 2 The Data Table. Chapter Table of Contents

Chapter 2 The Data Table. Chapter Table of Contents Chapter 2 The Data Table Chapter Table of Contents Introduction... 21 Bringing in Data... 22 OpeningLocalFiles... 22 OpeningSASFiles... 27 UsingtheQueryWindow... 28 Modifying Tables... 31 Viewing and Editing

More information

PharmaSUG 2013 - Paper CC18

PharmaSUG 2013 - Paper CC18 PharmaSUG 2013 - Paper CC18 Creating a Batch Command File for Executing SAS with Dynamic and Custom System Options Gary E. Moore, Moore Computing Services, Inc., Little Rock, Arkansas ABSTRACT You would

More information

A Technique for Storing and Manipulating Incomplete Dates in a Single SAS Date Value

A Technique for Storing and Manipulating Incomplete Dates in a Single SAS Date Value A Technique for Storing and Manipulating Incomplete Dates in a Single SAS Date Value John Ingersoll Introduction: This paper presents a technique for storing incomplete date values in a single variable

More information

A Method for Cleaning Clinical Trial Analysis Data Sets

A Method for Cleaning Clinical Trial Analysis Data Sets A Method for Cleaning Clinical Trial Analysis Data Sets Carol R. Vaughn, Bridgewater Crossings, NJ ABSTRACT This paper presents a method for using SAS software to search SAS programs in selected directories

More information

Innovative Techniques and Tools to Detect Data Quality Problems

Innovative Techniques and Tools to Detect Data Quality Problems Paper DM05 Innovative Techniques and Tools to Detect Data Quality Problems Hong Qi and Allan Glaser Merck & Co., Inc., Upper Gwynnedd, PA ABSTRACT High quality data are essential for accurate and meaningful

More information

Statistics and Analysis. Quality Control: How to Analyze and Verify Financial Data

Statistics and Analysis. Quality Control: How to Analyze and Verify Financial Data Abstract Quality Control: How to Analyze and Verify Financial Data Michelle Duan, Wharton Research Data Services, Philadelphia, PA As SAS programmers dealing with massive financial data from a variety

More information

EXST SAS Lab Lab #4: Data input and dataset modifications

EXST SAS Lab Lab #4: Data input and dataset modifications EXST SAS Lab Lab #4: Data input and dataset modifications Objectives 1. Import an EXCEL dataset. 2. Infile an external dataset (CSV file) 3. Concatenate two datasets into one 4. The PLOT statement will

More information

Activity 4 Determining Mean and Median of a Frequency Distribution Table

Activity 4 Determining Mean and Median of a Frequency Distribution Table Activity 4 Determining Mean and Median of a Frequency Distribution Table Topic Area: Data Analysis and Probability NCTM Standard: Select and use appropriate statistical methods to analyze data. Objective:

More information

Counting the Ways to Count in SAS. Imelda C. Go, South Carolina Department of Education, Columbia, SC

Counting the Ways to Count in SAS. Imelda C. Go, South Carolina Department of Education, Columbia, SC Paper CC 14 Counting the Ways to Count in SAS Imelda C. Go, South Carolina Department of Education, Columbia, SC ABSTRACT This paper first takes the reader through a progression of ways to count in SAS.

More information

Performance Test Suite Results for SAS 9.1 Foundation on the IBM zseries Mainframe

Performance Test Suite Results for SAS 9.1 Foundation on the IBM zseries Mainframe Performance Test Suite Results for SAS 9.1 Foundation on the IBM zseries Mainframe A SAS White Paper Table of Contents The SAS and IBM Relationship... 1 Introduction...1 Customer Jobs Test Suite... 1

More information

Using SAS Views and SQL Views Lynn Palmer, State of California, Richmond, CA

Using SAS Views and SQL Views Lynn Palmer, State of California, Richmond, CA Using SAS Views and SQL Views Lynn Palmer, State of Califnia, Richmond, CA ABSTRACT Views are a way of simplifying access to your ganization s database while maintaining security. With new and easier ways

More information

The Power of CALL SYMPUT DATA Step Interface by Examples Yunchao (Susan) Tian, Social & Scientific Systems, Inc., Silver Spring, MD

The Power of CALL SYMPUT DATA Step Interface by Examples Yunchao (Susan) Tian, Social & Scientific Systems, Inc., Silver Spring, MD Paper 052-29 The Power of CALL SYMPUT DATA Step Interface by Examples Yunchao (Susan) Tian, Social & Scientific Systems, Inc., Silver Spring, MD ABSTRACT AND INTRODUCTION CALL SYMPUT is a SAS language

More information

Oracle 10g PL/SQL Training

Oracle 10g PL/SQL Training Oracle 10g PL/SQL Training Course Number: ORCL PS01 Length: 3 Day(s) Certification Exam This course will help you prepare for the following exams: 1Z0 042 1Z0 043 Course Overview PL/SQL is Oracle's Procedural

More information

Katie Minten Ronk, Steve First, David Beam Systems Seminar Consultants, Inc., Madison, WI

Katie Minten Ronk, Steve First, David Beam Systems Seminar Consultants, Inc., Madison, WI Paper 191-27 AN INTRODUCTION TO PROC SQL Katie Minten Ronk, Steve First, David Beam Systems Seminar Consultants, Inc., Madison, WI ABSTRACT PROC SQL is a powerful Base SAS 7 Procedure that combines the

More information

RSA Security Analytics Certified Administrator (CA) Certification Examination Study Guide

RSA Security Analytics Certified Administrator (CA) Certification Examination Study Guide RSA Security Analytics Certified Administrator (CA) Certification Examination Study Guide Introduction The RSA Security Analytics Certified Administrator (CA) examination is based on the critical job functions

More information

USERS MANUAL FOR OWL A DOCUMENT REPOSITORY SYSTEM

USERS MANUAL FOR OWL A DOCUMENT REPOSITORY SYSTEM USERS MANUAL FOR OWL A DOCUMENT REPOSITORY SYSTEM User Manual Table of Contents Introducing OWL...3 Starting to use Owl...4 The Logging in page...4 Using the browser...6 Folder structure...6 Title Bar...6

More information

A Dose of SAS to Brighten Your Healthcare Blues

A Dose of SAS to Brighten Your Healthcare Blues A Dose of SAS to Brighten Your Healthcare Blues Gabriela Cantu 1, Christopher Klekar 1 1 Center for Clinical Effectiveness, Baylor Scott & White Health, Dallas, Texas ABSTRACT The development and adoption

More information

Nine Steps to Get Started using SAS Macros

Nine Steps to Get Started using SAS Macros Paper 56-28 Nine Steps to Get Started using SAS Macros Jane Stroupe, SAS Institute, Chicago, IL ABSTRACT Have you ever heard your coworkers rave about macros? If so, you've probably wondered what all the

More information

Project Request and Tracking Using SAS/IntrNet Software Steven Beakley, LabOne, Inc., Lenexa, Kansas

Project Request and Tracking Using SAS/IntrNet Software Steven Beakley, LabOne, Inc., Lenexa, Kansas Paper 197 Project Request and Tracking Using SAS/IntrNet Software Steven Beakley, LabOne, Inc., Lenexa, Kansas ABSTRACT The following paper describes a project request and tracking system that has been

More information

Different ways of calculating percentiles using SAS Arun Akkinapalli, ebay Inc, San Jose CA

Different ways of calculating percentiles using SAS Arun Akkinapalli, ebay Inc, San Jose CA Different ways of calculating percentiles using SAS Arun Akkinapalli, ebay Inc, San Jose CA ABSTRACT Calculating percentiles (quartiles) is a very common practice used for data analysis. This can be accomplished

More information

The HPSUMMARY Procedure: An Old Friend s Younger (and Brawnier) Cousin Anh P. Kellermann, Jeffrey D. Kromrey University of South Florida, Tampa, FL

The HPSUMMARY Procedure: An Old Friend s Younger (and Brawnier) Cousin Anh P. Kellermann, Jeffrey D. Kromrey University of South Florida, Tampa, FL Paper 88-216 The HPSUMMARY Procedure: An Old Friend s Younger (and Brawnier) Cousin Anh P. Kellermann, Jeffrey D. Kromrey University of South Florida, Tampa, FL ABSTRACT The HPSUMMARY procedure provides

More information

I. Definitions of Membership Categories... p.2. II. Society Dues Structure p.4. III. Chapter Rosters p.5. IV. Membership Reports p.

I. Definitions of Membership Categories... p.2. II. Society Dues Structure p.4. III. Chapter Rosters p.5. IV. Membership Reports p. Congratulations on accepting the position of Membership Director for your local chapter. This is an important role, as you are representing RIMS and your local chapter to both current members and prospective

More information

Simulate PRELOADFMT Option in PROC FREQ Ajay Gupta, PPD, Morrisville, NC

Simulate PRELOADFMT Option in PROC FREQ Ajay Gupta, PPD, Morrisville, NC ABSTRACT PharmaSUG 2015 - Paper QT33 Simulate PRELOADFMT Option in PROC FREQ Ajay Gupta, PPD, Morrisville, NC In Pharmaceuticals/CRO industries, table programing is often started when only partial data

More information

The Query Builder: The Swiss Army Knife of SAS Enterprise Guide

The Query Builder: The Swiss Army Knife of SAS Enterprise Guide Paper 1557-2014 The Query Builder: The Swiss Army Knife of SAS Enterprise Guide ABSTRACT Jennifer First-Kluge and Steven First, Systems Seminar Consultants, Inc. The SAS Enterprise Guide Query Builder

More information

Salary. Cumulative Frequency

Salary. Cumulative Frequency HW01 Answering the Right Question with the Right PROC Carrie Mariner, Afton-Royal Training & Consulting, Richmond, VA ABSTRACT When your boss comes to you and says "I need this report by tomorrow!" do

More information

USING SAS WITH ORACLE PRODUCTS FOR DATABASE MANAGEMENT AND REPORTING

USING SAS WITH ORACLE PRODUCTS FOR DATABASE MANAGEMENT AND REPORTING USING SAS WITH ORACLE PRODUCTS FOR DATABASE MANAGEMENT AND REPORTING Henry W. Buffum, R. O. W. ScIences, Inc. Darryl J. Keith, U.S. Environmental Protection Agency Abstract: Data for a large environmental

More information

McAfee Endpoint Encryption Reporting Tool

McAfee Endpoint Encryption Reporting Tool McAfee Endpoint Encryption Reporting Tool User Guide Version 5.2.13 McAfee, Inc. McAfee, Inc. 3965 Freedom Circle, Santa Clara, CA 95054, USA Tel: (+1) 888.847.8766 For more information regarding local

More information

Survey Analysis: Options for Missing Data

Survey Analysis: Options for Missing Data Survey Analysis: Options for Missing Data Paul Gorrell, Social & Scientific Systems, Inc., Silver Spring, MD Abstract A common situation researchers working with survey data face is the analysis of missing

More information

Credit Union Employee Security - Understanding CU*BASE

Credit Union Employee Security - Understanding CU*BASE Auditing Employee Access to CU*BASE Tools Understanding CU*BASE Employee Activity Tracking Features & Data Center Employee Security INTRODUCTION This booklet describes special features your credit union

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

Measuring equipment in a laboratory.

Measuring equipment in a laboratory. Measuring equipment in a laboratory. Laboratory and metrology are two words that practically do not function separately. They are integrally connected to measuring equipment for tests and measurements.

More information

A New Paradigm for Synchronous State Machine Design in Verilog

A New Paradigm for Synchronous State Machine Design in Verilog A New Paradigm for Synchronous State Machine Design in Verilog Randy Nuss Copyright 1999 Idea Consulting Introduction Synchronous State Machines are one of the most common building blocks in modern digital

More information

Oh No, a Zero Row: 5 Ways to Summarize Absolutely Nothing

Oh No, a Zero Row: 5 Ways to Summarize Absolutely Nothing Paper CC22 Oh No, a Zero Row: 5 Ways to Summarize Absolutely Nothing Stacey D. Phillips, i3 Statprobe, San Diego, CA Gary Klein, i3 Statprobe, San Diego, CA ABSTRACT SAS is wonderful at summarizing our

More information

containing Kendall correlations; and the OUTH = option will create a data set containing Hoeffding statistics.

containing Kendall correlations; and the OUTH = option will create a data set containing Hoeffding statistics. Getting Correlations Using PROC CORR Correlation analysis provides a method to measure the strength of a linear relationship between two numeric variables. PROC CORR can be used to compute Pearson product-moment

More information

Paper TU_09. Proc SQL Tips and Techniques - How to get the most out of your queries

Paper TU_09. Proc SQL Tips and Techniques - How to get the most out of your queries Paper TU_09 Proc SQL Tips and Techniques - How to get the most out of your queries Kevin McGowan, Constella Group, Durham, NC Brian Spruell, Constella Group, Durham, NC Abstract: Proc SQL is a powerful

More information

An Approach to Creating Archives That Minimizes Storage Requirements

An Approach to Creating Archives That Minimizes Storage Requirements Paper SC-008 An Approach to Creating Archives That Minimizes Storage Requirements Ruben Chiflikyan, RTI International, Research Triangle Park, NC Mila Chiflikyan, RTI International, Research Triangle Park,

More information

We begin by defining a few user-supplied parameters, to make the code transferable between various projects.

We begin by defining a few user-supplied parameters, to make the code transferable between various projects. PharmaSUG 2013 Paper CC31 A Quick Patient Profile: Combining External Data with EDC-generated Subject CRF Titania Dumas-Roberson, Grifols Therapeutics, Inc., Durham, NC Yang Han, Grifols Therapeutics,

More information

PROC SUMMARY Options Beyond the Basics Susmita Pattnaik, PPD Inc, Morrisville, NC

PROC SUMMARY Options Beyond the Basics Susmita Pattnaik, PPD Inc, Morrisville, NC Paper BB-12 PROC SUMMARY Options Beyond the Basics Susmita Pattnaik, PPD Inc, Morrisville, NC ABSTRACT PROC SUMMARY is used for summarizing the data across all observations and is familiar to most SAS

More information

A Gentle Introduction to Hash Tables. Kevin Martin, Kevin.Martin2@va.gov Dept. of Veteran Affairs July 15, 2009

A Gentle Introduction to Hash Tables. Kevin Martin, Kevin.Martin2@va.gov Dept. of Veteran Affairs July 15, 2009 A Gentle Introduction to Hash Tables Kevin Martin, Kevin.Martin2@va.gov Dept. of Veteran Affairs July 15, 2009 ABSTRACT Most SAS programmers fall into two categories. Either they ve never heard of hash

More information

Quick Start to Data Analysis with SAS Table of Contents. Chapter 1 Introduction 1. Chapter 2 SAS Programming Concepts 7

Quick Start to Data Analysis with SAS Table of Contents. Chapter 1 Introduction 1. Chapter 2 SAS Programming Concepts 7 Chapter 1 Introduction 1 SAS: The Complete Research Tool 1 Objectives 2 A Note About Syntax and Examples 2 Syntax 2 Examples 3 Organization 4 Chapter by Chapter 4 What This Book Is Not 5 Chapter 2 SAS

More information

Integrated Supply Chain Solutions for. Life Science Industry. Consider It Delivered

Integrated Supply Chain Solutions for. Life Science Industry. Consider It Delivered Integrated Supply Chain Solutions for Life Science Industry Consider It Delivered Business Profile With an Irish Medicines Board (IMB) approved Wholesalers Authorisation for its warehousing operation,

More information

bbc Adobe PDF/XML Architecture - Working Samples

bbc Adobe PDF/XML Architecture - Working Samples bbc Adobe PDF/XML Architecture - Working Samples Version 1.0 ADOBE SYSTEMS INCORPORATED Corporate Headquarters 345 Park Avenue San Jose, CA 95110-2704 (408) 536-6000 http://partners.adobe.com August, 2003

More information

Multiple Set Statements in a Data Step: A Powerful Technique for Combining and Aggregating Complex Data. Renu Gehring

Multiple Set Statements in a Data Step: A Powerful Technique for Combining and Aggregating Complex Data. Renu Gehring Multiple Set Statements in a Data Step: A Powerful Technique for Combining and Aggregating Complex Data Renu Gehring SAS Instructor Ace-Cube, LLP Beaverton, OR Health Care Analyst CareOregon, Inc. Portland,

More information

Alternatives to Merging SAS Data Sets But Be Careful

Alternatives to Merging SAS Data Sets But Be Careful lternatives to Merging SS Data Sets ut e Careful Michael J. Wieczkowski, IMS HELTH, Plymouth Meeting, P bstract The MERGE statement in the SS programming language is a very useful tool in combining or

More information

How to Benchmark Your Building. Instructions for Using ENERGY STAR Portfolio Manager and Southern California Gas Company s Web Services

How to Benchmark Your Building. Instructions for Using ENERGY STAR Portfolio Manager and Southern California Gas Company s Web Services How to Benchmark Your Building Instructions for Using ENERGY STAR Portfolio Manager and Southern California Gas Company s Web Services This document is a quick-start guide for entering your property into

More information

SAS -Based Data Management System for Clinical Drug Trials. Jean Bitney, A. H. Robins

SAS -Based Data Management System for Clinical Drug Trials. Jean Bitney, A. H. Robins SAS -Based Data Management System for Clinical Drug Trials Jean Bitney, A. H. Robins Data collected during clinical trials at A. H. Robins Company are entered into a computer file and maintained in permanent

More information

SAS Enterprise Guide A Quick Overview of Developing, Creating, and Successfully Delivering a Simple Project

SAS Enterprise Guide A Quick Overview of Developing, Creating, and Successfully Delivering a Simple Project Paper 156-29 SAS Enterprise Guide A Quick Overview of Developing, Creating, and Successfully Delivering a Simple Project Ajaz (A.J.) Farooqi, Walt Disney Parks and Resorts, Lake Buena Vista, FL ABSTRACT

More information

You have got SASMAIL!

You have got SASMAIL! You have got SASMAIL! Rajbir Chadha, Cognizant Technology Solutions, Wilmington, DE ABSTRACT As SAS software programs become complex, processing times increase. Sitting in front of the computer, waiting

More information

Preparing your data for analysis using SAS. Landon Sego 24 April 2003 Department of Statistics UW-Madison

Preparing your data for analysis using SAS. Landon Sego 24 April 2003 Department of Statistics UW-Madison Preparing your data for analysis using SAS Landon Sego 24 April 2003 Department of Statistics UW-Madison Assumptions That you have used SAS at least a few times. It doesn t matter whether you run SAS in

More information

Leads and Lags: Static and Dynamic Queues in the SAS DATA STEP

Leads and Lags: Static and Dynamic Queues in the SAS DATA STEP Paper 7-05 Leads and Lags: Static and Dynamic Queues in the SAS DATA STEP Mark Keintz, Wharton Research Data Services ABSTRACT From stock price histories to hospital stay records, analysis of time series

More information

Christianna S. Williams, University of North Carolina at Chapel Hill, Chapel Hill, NC

Christianna S. Williams, University of North Carolina at Chapel Hill, Chapel Hill, NC Christianna S. Williams, University of North Carolina at Chapel Hill, Chapel Hill, NC ABSTRACT Have you used PROC MEANS or PROC SUMMARY and wished there was something intermediate between the NWAY option

More information