Description Usage Format Source Examples
BRFSS Caregiving Module Questions asked from 2015-2020 https://www.cdc.gov/aging/healthybrain/brfss-faq-caregiver.htm.
1 |
A "long" data frame with XX rows of individual BRFSS respondents in a given state and year and YY column variables:
indicator, numeric variable of whether respondent was Caregiver (cg_d_num=1) or not (cg_d_num=0)
indicator, factor variable of whether respondent was Caregiver (cg_d_fct="CG") or not (cg_d_fct="Non-CG")
state FIPS code, labeled with state alphabetic abbreviation
identificaiton variable
Numeric year, 2014-2020
Original, raw sampling weight: 2014-2020
BRFSS Annual Survey Data https://www.cdc.gov/brfss/annual_data/annual_data.htm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # To adjust the sampling weight (cg_wt_adj) by dividing the
# sampling weight (cg_wt_raw) by the number of instances
# a state is in the data, run:
library(tidyverse)
data(brfss_cg)
waves<-brfss_cg %>%
filter(year %in% 2016:2018) %>% #keeping only 2016-2018 for illustration
group_by(year,state) %>%
slice(1) %>% #keeping the first observation of each state + year
ungroup() %>%
group_by(state) %>% #grouping by state
count() %>% #counting how many years the state was included
rename(wave=n) #renaming as wave
brfss_cg<-full_join(brfss_cg,waves,by="state") %>%
mutate(cg_wt_adj = cg_wt_raw/wave) #adjusting the weight by number of waves
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.