Chapter1

# Chapter1 - Chapter 1 Chapter 1 1.1 SAS Getting Your Data...

This preview shows pages 1–4. Sign up to view the full content.

Chapter 1 SAS - 1 - Chapter 1 Getting Your Data into SAS 1.1 The SAS Language Many software applications are either menu driven, command driven (enter a command and you see the results), but SAS is neither. SAS uses statements to write a series of instructions called a SAS program. The primary purpose of each SAS program is to carry out a specific statistical analysis (or calculation) or to carry out series of statistical analyses, answers to which solves a statistical problem. Given a data set, we will want to carry out many different types of statistical analyses that we have learned in some of our prerequisite Statistics courses. For example, we may want to find simple summary statistics such as mean, median, standard deviation etc; create a scatter plot; plot histograms/density functions; test hypotheses; find confidence intervals; carry out simple linear regression or ANOVA etc. For each of these statistical questions, there is a specific SAS command which carries out the desired statistical procedure. Therefore, writing a SAS program in large part involves identifying appropriate SAS procedures, which will carry out desired statistical analyses. A SAS program is a sequence of statements executed in order. Each statement gives instructions to SAS and must be placed appropriately in the program. We will now open up a SAS session (or SAS windows) by double clicking the SAS icon on your desktop. Next, we will familiarize ourselves with some of the icons and functions associated with SAS windows. 1. SAS will open up the following four windows: a. Enhanced” editor window – type your SAS program here Program code is color coded to its function. b. Log window – contains messages about program after its run (i.e., did it work?) c. Output window – output generated by procedures (PROC, in short) d. Explorer window – find data sets saved (permanent or temporary) e. Results window – find your results here according to procedures used f. “Program” editor – same as enhanced editor without the color coding of program code ( do not use! ) g. Running a program buttons i) Submit - “running man” button ii) Break - h. Save the program -

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Chapter 1 SAS - 2 - 2. Before we start with our first SAS program, let us right click on ‘ Libraries’ in the Explorer window in the open SAS session. You will see this: Now left click on New ( see under Open). This will open a window called New Library. Now type SASdata in the box beside Name and ‘ Check mark’ Enable at Startup . Now click Browse and you will see the Select window open up, as shown below. Now use the pull down menu beside “Look in” and select the path Your Drive:\6360\SASdata.
Chapter 1 SAS - 3 - You will see scores.txt, which contains the first data we will analyze and possibly many others. Click OK in the Select window and this specifies the Path in the New Library window. Click OK again and this should put the SASdata under the Libraries. All you are doing is to make the SASdata

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 28

Chapter1 - Chapter 1 Chapter 1 1.1 SAS Getting Your Data...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online