# Complex Survey Analysis in R

### What is Public Health?

Public health is a broad and sometimes overreaching field. Consequently, I am asked, “what is public health?” more so than “what school did you go to (in Hawaii)?” With that said, I would like to start off with a quote by C.E. Taylor:

“The focus of public health is the community. The ‘patient’ is a whole population unit. The shift in professional orientation which occurs as the unit of attention moves from the individual to the group must be clearly recognized and explicitly stated because it has led to many misunderstandings in the past.”

Once it is clearly understood that public health is not brain surgery and according to the CDC more about zombie invasions, the next question asked is “so what does public health do if it doesn’t cure diabetes?” Such a loaded question. In a nutshell, the four core functions of public health are as follows:

• Assessment
• Policy development
• Assurance
• Communication

In other words, public health professionals rely on studies and surveys, such as the Behavioral Risk Factors Surveillance System (BRFSS), to understand health trends. Consequently, campaigns and/or policies are developed to break trends when needed.

### So why R?

SAS-callable SUDAAN is the usual software of choice when analyzing complex surveys as it can account for the sampling design and weighting; however, we can also do this with the R software environment for statistical computing. Proprietary statistical programs will always be public health’s frenemies in the area of research and complex survey analysis, but let’s not write off R too soon as it is a powerful data visualization companion.

### Data

In laymen’s terms, many public health organizations and professionals cite the BRFSS when interested in health risk behaviors, health access and chronic disease prevalence. Introductions and examples have already been created on BRFSS for R, and have been featured on R-bloggers. Anthony Damico maintains a GitHub repository on downloading and storing complex surveys. I recommend his solution for those who are new to R and/or complex survey analysis and because there is a significant speed increase when working on analyzing the BRFSS alongside MonetDB.

In this example, I analyzed overweight or obese risk in the 2015 BRFSS series. The question I wanted to answer was if Hawaii should be written off as the healthiest state in the nation.

#### Structure

The BRFSS data set contains over 300 variables. In this case, we are only interested in looking at respondents’ reported BMI category and preferred race. We also need to extract additional variables such as weight, residency and strata.

X_PSUX_LLCPWTX_STSTRX_STATEX_RFBMI5X_PRACE1
2.015e+09341.3848511011121
2.015e+09108.0609011011121
2.015e+09255.2648011011111
2.015e+09341.3848511011121
2.015e+09258.6822211011111
2.015e+09256.5185911011121
2.015e+0985.6597511011111
2.015e+09545.7821011011121
2.015e+09211.2103011011111
2.015e+09215.4728611011121

### Data Wrangling

The variables require some data wrangling. Both BMI category and preferred race are numerically encoded and may be difficult to interpret without a data dictionary. Discretizing variable levels with descriptive labels may also help with interpretation.

### Complex Survey Analysis

The survey design can now be specified with both the survey and preprocessed variables. This step may take some time given the size of this data set, and so the survey object is subset on the state of Hawaii for the rest of the analysis.

## Results

Although more than half of residents reported to be overweight or obese, Hawaii still has one of the lowest rates in the nation (0.57% vs. 64.6%). Yet when stratifying by preferred race, Hawaii actually has some of the highest prevalence rates for overweight and obesity risk factors in the nation. In 2015, Native Hawaiians and Other Pacific Islanders (NHOPI) overweight or obese risk was at 79.17% (95% confidence interval [CI]: 71.88-86.46%).

## Conclusion

So why was this exercise important? The two charts tell a compelling story. If we were to accept only the first cut of the data, then policies and initiatives may overlook Hawaii. However, the second chart reveals that NHOPIs are at extreme risk for negative health outcomes.

Public health attempts to understand trends and/or driving factors that cause morbidity or mortality. These analyses then help to drive interventions and policies that may potentially make the greatest impact. Tools like R can assist with this process as it democratizes data and analysis so that different perspectives can be added to the overall discussion.

## Other Projects

### Statistically Significant Trend Analysis

Powered by Hydejack v6.6.0