![]()
|
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]()
6.3. Sample SAS Programs for Tobacco Related Data This section provides information for data analysts who need to understand how the NHIS sample SAS program files are structured in order to use them in their own analyses of tobacco related data. See Section 6.3.2 for a list of the program files for data files that contain tobacco use data. 6.3.1 Overview of NHIS Tobacco Related SAS Program Files On this website, we have provided a list of SAS program files for the years that the NHIS contained questions on tobacco use. The user can modify the sample SAS program files so that they read in only the variables related to an analysis of tobacco use To be able to write a SAS program to analyze NHIS tobacco use data, the user needs to have the questionnaire, the codebook file and the data file available for the desired year(s). To make it easier for the user, a sample SAS program is included on the NHIS website for each for data files released each year. Similar programs are included for the SPSS and STATA statistical packages. The information given here for the SAS statistical package applies to the other statistical packages also. A SAS program file is a ASCII* text file that reads in an ASCII data file. The ASCII data file is not specific to SAS, and can be read by the input section of any program written for any other statistical package. For example, the sample SPSS and STATA programs provided on the NHIS website read in the same ASCII data file that the SAS program file accesses. When the SAS statistical package runs the SAS program file provided, it creates a SAS dataset that the user can use as a temporary file, or can save as a permanent SAS dataset. This technique permits the user to run the sample NHIS SAS program on any platform, with any version of SAS, and be assured that the correct SAS dataset will be created. The first time the SAS program file is run, it does the following:
The user can customize the program to: 1)use format statements rather than a stored library, 2)continue to read in an ASCII file rather than create a SAS dataset, 3)use other platforms than Windows, and 4)perform other analytic procedures not included in the sample program file. The website links are not provided to the SAS program files because the files are handled differently, depending on whether or not SAS is accessible from the user’s computer.
* American Standard Code for Information Interchange (ASCII)
This page last reviewed October 15, 2008
|