ABSTRACT

This chapter covers all the steps normally followed in SAS to prepare health data for analysis. It covers two main tasks associated with writing data into R. In SAS, after reading in a dataset, it is typical to check the contents of the dataset using a PROC CONTENTS command, and it is also typical to check the log file to see if the number of observations read in matches what is expected, or else, to see if there are any errors. In the BRFSS dataset, most continuous variables have some categorical coding. Categorical variables with two or more levels can serve as grouping variables, but in most datasets, these need to be created based on calculations from raw data variables. Often in health-related datasets, there are a lot of dates, such as the date of visit or the date of having some outcome.