09.08.2015 Views

Data User’s Guide

Data User's Guide

Data User's Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2007 YOUTH RISK BEHAVIOR SURVEYf. Select “All” from the run menu.g. The SPSS-formatted data set (.SAV) is now ready for analysis.2. How to use the SAS Format LibraryThe SAS format library contains the formats used to make SAS output more readable. Formatsare linked to the data so that results are displayed as words (“Male” or “Female”, for instance)instead of numbers (1 or 2). The SAS YRBS data file is designed to use its companion formatlibrary. You should download both the data file and the format library if you want to use SAS toanalyze YRBS data.The following example SAS program shows how to use the format library. It assumes that boththe data file and the format library have been downloaded to “c:\data”. Note that the programcontains two libname statements. The first libname statement indicates where the data file islocated; the second libname statement indicates where the format library is located.libname mydata 'c:\data'; /* tells SAS where the data are */libname library 'c:\data'; /* tells SAS where the formats are */proc freq data=mydata.yrbs2005;tables q2;run;Using the format library is recommended but technically is optional. If you do not want to usethe format library, include the following statement at the start of your SAS program:options nofmterr; /* tells SAS to not look for formats */Please note that each year of YRBS data has its own format library. Format libraries are not thesame across years of data.For further information on using format libraries, please consult your SAS documentation.45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!