SAS mini guide exemplar

Step 1:
Make sure you have SAS on your system.

If you want to run the program that calculate the weights follow steps W2 to W6. To run the anl;yses go to steps A2  to A7

Step W2: First save the SAS programme code: ex5wt.sas and data file: ex5wt.sas7bdat .

Step W3: Then start the SAS program, and the enhanced editor ( from view menu) and open  (from file menu)  the saved SAS progam  file (ex5wt.sas). 

Step W4: The next thing you need to do is to tell SAS where your data is located. You will see the first NOT GREEN line starts with the SAS command LIBNAME (SAS is not case sensitive). Change the part in quotes to the name of the directory on your computer where the SAS data set for exemplar 2 is stored. (screenshot 1.) e.g peas/sas/data/  (do not include the data file name.)
Highlight that line of code and run (submit) it to SAS by clicking on the running man at the top row of icons. Check that log file to see if it has worked.

Step W5: You are now ready to run the next bit of the program. You can also examine the data set by clicking on the libraries icon in the panel named 

 

 Step W6: Now highlight the next bit of code up to
to RUN;. Submit this  (running man icon) and check that it has worked by checking the log file.  To see what all your results should look like click on this results file: ex5wtsasres.htm

Weighting steps:
Step A2: First save the SAS programme code: ex5.sas and data file: ex5.sas7bdat .

Step A3: Then start the SAS program, and the enhanced editor ( from view menu) and open  (from file menu)  the saved SAS progam  file (ex5.sas). 

Step A4: The next thing you need to do is to tell SAS where your data is located. You will see the first NOT GREEN line starts with the SAS command LIBNAME (SAS is not case sensitive). Change the part in quotes to the name of the directory on your computer where the SAS data set for exemplar 2 is stored. (screenshot 1.) e.g peas/sas/data/  (do not include the data file name.)
Highlight that line of code and run (submit) it to SAS by clicking on the running man at the top row of icons. Check that log file to see if it has worked.

Step A5: Now save the SAS formats file: ex5_formats.sas to your computer and then open it in SAS and run it to assign Formats to variables (screenshot 2)


Step A6: You are now ready to run the next bit of the program. You can also examine the data set by clicking on the libraries icon in the panel named

 Step A7: Now highlight the next bit of code up to
to RUN;. Submit this  (running man icon) and check that it has worked by checking the log file.  To see what all your results should look like click on this results file: ex5wtsasres.htm

To find out more about the SAS package click here.