SAS - Chap 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

SAS libraries

...

What is the default storage length for SAS numeric variables (in bytes)? (cody, chap 1)

8

SAS report window?

Check tomorrow 5/22/3014; is it interactive?

Processing SAS programs

DATA and PROC statements signal the beginning of a new step. The RUN statement for DATA and PROC statements and QUIT statements for SQL statements marks the step boundaries. At a step boundary, SAS executes any statements that have not previously executed and ends the step. The beginning of a new step (DATA or PROC) step also implies the end of the previous step

Identify which of the following variable names are valid SAS names: (cody chap 1) Height HeightInCentimeters Height_in_centimeters Wt-Kg x123y456 76Trombones MiXeDCasE

Invalid variable names are: Wt-Kg (contains a dash) 76Trombones (starts with a number)

SAS data sets contain two parts

It is important to understand that SAS data sets contain two parts: a descriptor portion and a data portion. Not only does SAS store the actual data values for you, it stores information about these values (things like storage lengths, labels, and formats).

PROC Step

PROC procedure invoke or call pre-written routines that enables you to analyze and process the data in a SAS data set; You can use PROC steps to: Create a report that lists the data (e.g., PROC PRINT) Produce descriptive statistics (e.g., PROC FREQ) Create a summary report (e.g., PROC SUMMARY) Produce plots and charts

EXAM Requirements

Required Exam Candidates who earn this credential will have earned a passing score on the SAS Base Programming for SAS 9 exam. This exam is administered by SAS and Pearson VUE. 64 multiple-choice and short-answer questions (must achieve score of 70% correct to pass) 110 minutes to complete exam Use exam ID A00-211; required when registering with Pearson VUE. Candidates should be familiar with the enhancements and new functionality that are available in SAS 9.3. Exam topics include: Accessing Data: Use FORMATTED and LIST input to read raw data files. Use INFILE statement options to control processing when reading raw data files. Use various components of an INPUT statement to process raw data files including column and line pointer controls, and trailing @ controls. Combine SAS data sets. Access an Excel workbook. Creating Data Structures: Create temporary and permanent SAS data sets. Create and manipulate SAS date values. Export data to create standard and comma-delimited raw data files. Control which observations and variables in a SAS data set are processed and output. Managing Data: Investigate SAS data libraries using base SAS utility procedures. Sort observations in a SAS data set. Conditionally execute SAS statements. Use assignment statements in the DATA step. Modify variable attributes using options and statements in the DATA step. Accumulate sub-totals and totals using DATA step statements. Use SAS functions to manipulate character data, numeric data, and SAS date values. Use SAS functions to convert character data to numeric and vice versa. Process data using DO LOOPS. Process data using SAS arrays. Validate and clean data. Generating Reports: Generate list reports using the PRINT procedure. Generate summary reports and frequency tables using base SAS procedures. Enhance reports through the use of user-defined formats, titles, footnotes and SAS System reporting. Generate reports using ODS statements. Handling Errors: Identify and resolve programming logic errors. Recognize and correct syntax errors. Examine and resolve data errors.

SAS Names

SAS names follow a simple naming rule: All SAS variable names and data set names can be no longer than 32 characters and must begin with a letter or the underscore ( _ ) character. The remaining characters in the name may be letters, digits, or the underscore character. Characters such as dashes and spaces are not allowed. Here are some valid and invalid SAS names (Cody text, chap 1, pg8) . Note: libref can have only 8 characters Valid SAS Names Parts LastName First_Name Ques5 Cost_per_Pound DATE time X12Y34Z56 Invalid SAS Names 8_is_enough >>> Begins with a number Price per Pound >>> Contains blanks Month-total >>> Contains an invalid character ( - ) Num% >>> Contains an invalid character (%)

TITLE statement

Statements such as the TITLE statement are called global statements. The term global refers to the fact that the operations these statements perform are not tied to one single DATA or PROC step. They affect the entire SAS environment. In addition, the operations performed by these global statements remain in effect until they are changed. For example, if you have a single TITLE statement in the beginning of your program, that title will head every page of output from that point on until you write a new TITLE statement. It is a good practice to place a TITLE statement before every procedure that produces output to make it easy for someone to read and understand the information on the page. If you exit your SAS session, your titles are all reset and you need to submit new TITLE statements if you want them to appear.

DATA Step

Typically create or modify SAS data sets. They can be used to produce custom design reports: You can use DATA step to put data in to SAS data set Compute values Check for and correct error in your data Produce new SAS data sets by subsetting, supersetting, merging, and updating existing data sets.

Program 2-1 Your first SAS program data demographic; infile "c:\books\learning\mydata.txt"; input Gender $ Age Height Weight; run; title "Gender Frequencies"; proc freq data=demographic; tables Gender; run; title "Summary Statistics"; proc means data=demographic; var Age Height Weight; run;

When you use the list input method for reading data, you only need to list the names you want to give each data value. Statements such as the TITLE statement are called global statements. The term global refers to the fact that the operations these statements perform are not tied to one single DATA or PROC step. They affect the entire SAS environment. In addition, the operations performed by these global statements remain in effect until they are changed. For example, if you have a single TITLE statement in the beginning of your program, that title will head every page of output from that point on until you write a new TITLE statement. It is a good practice to place a TITLE statement before every procedure that produces output to make it easy for someone to read and understand the information on the page. If you exit your SAS session, your titles are all reset and you need to submit new TITLE statements if you want them to appear.

You have a data set consisting of Student ID, English, History, Math, and Science (cody, chap 1) test scores on 10 students. a. The number of variables is __________ b. The number of observations is __________

a. 5 variables b. 10 observations


Set pelajaran terkait

⭐️CM1 test TWO: Med Surg evolve questions

View Set

JAVA-Data Types, Variables and Arrays

View Set

8, 9, 10 and 11 test business management

View Set

BIO110 - Module 3 Homework Study Guide

View Set