The CHIS Quickstart guide for RThough CHIS is a complex survey, it's simple to work with CHIS data in R. Here's how to get started:
- Head over to the CHIS site and create an account.
- CHIS data is divided into 3 groups, child, adolescent, and adult. We'll work with the adult data below.
- You'll also want to download the appropriate data dictionary for your data set. The dictionary provides excellent documentation about the hundreds of variables covered by CHIS. If it's your first time working with CHIS, I recommend a quick skim of the entire dictionary to get a sense of the kinds of things covered by the survey.
# Read CHIS file library(foreign) file <- "~/projects/CHIS/chis15_adult_stata/Data/ADULT.dta" # your file CHIS <- read.dta(file, convert.factors = TRUE)
The most important thing to understand about CHIS data is how to use the replicate weights RAKEDW0-RAKED80. I covered the use of replicate weights in detail in this post. The important points about replicate weights in CHIS are:
- Use RAKEDW0 for estimating means and counts in CHIS. RAKEDW0 is designed so that it's sum across all rows in the CHIS data is equal to the total non-institutionalized adult population of California.
- Use RAKEDW1-RAKED80 for estimating variances as described here.
# tabulate the data print(as.data.frame(xtabs(rakedw0~instype, CHIS, drop.unused.levels = TRUE))) # instype Freq # 1 UNINSURED 2910380.5 # 2 MEDICARE & MEDICAID 1561496.7 # 3 MEDICARE & OTHERS 1646743.6 # 4 MEDICARE ONLY 2129841.7 # 5 MEDICAID 6239539.9 # 6 EMPLOYMENT-BASED 12193686.7 # 7 PRIVATELY PURCHASED 1985807.9 # 8 OTHER PUBLIC 415154.8
One interesting health behavior that CHIS tracks is fast food consumption. To create the variable AC31, CHIS asked respondents about the number of times they ate fast food in the past week. This simple script explores how fast food consumption behavior interacts with health insurance coverage type:
Already with this superficial analysis we can see some interesting things. First we notice that the uninsured are eating fast food more often than the non-Medicaid insured. The uninsured's fast food behavior looks quite similar to the Medicaid population while the fast food behaviour of the employment-based insured resembles the behaviour of the private purchase group. And most importantly, everyone is eating too much fast food.