SASstart - Getting Started in SAS Some general instructions...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Getting Started in SAS Some general instructions regarding homeworks: Do not use an alternate program(s) to make any of your graphs, for now just make them by hand, in homework 2 we will start using SAS! Occasionally I will give special instructions for some exercises, I will give these in parentheses AFTER the corresponding exercise, for example: 1.30 (Make a histogram using classes 0-2.5, 2.5-5.0, etc) The instructions ONLY applies to exercise 1.30. We will use text files for all our datasets, I.E. gesell.txt o All of the files needed are available on the CD that comes with the book, the ones I use and reference will be in the \PCDataSets\Text folder For most homework assignments involving SAS, you can literally copy the code from my SAS examples documents and modify it to complete the problem you are currently doing. Once your code is in the editor in SAS, you can save the code from SAS. It will save the code in a .sas file. This is actually a text file just with the .sas extension. But you can open it on any computer using notepad if you need to see the code. You can make comments at anytime in SAS coding that the program will ignore. To do so put them between /* and */, like so: /* Put comments here, they should turn green */ Basic Set-up: options pageno= 1 nodate; goptions colors =(none); Example : Inputting Data - 1 -
Background image of page 1

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

View Full DocumentRight Arrow Icon
Getting Started in SAS title 'Hispanic Example' ; data hispanic; input state $ percent; datalines ; AL 1.5 AK 3.6 AZ 21.3 WY 5.5 ; run ; data hispanic; infile 'C:\hispanic.txt' ; input state $ percent; run ; proc print data =hispanic; run ; One last example using a dataset from the textbook. Use this code for most of your homework exercises in SAS!!! data
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/20/2012 for the course STAT 501 taught by Professor Staff during the Spring '08 term at Purdue University-West Lafayette.

Page1 / 10

SASstart - Getting Started in SAS Some general instructions...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online