brfss_cg: BRFSS Caregiver (CG) Module Data

Description Usage Format Source Examples

Description

BRFSS Caregiving Module Questions asked from 2015-2020 https://www.cdc.gov/aging/healthybrain/brfss-faq-caregiver.htm.

Usage

1

Format

A "long" data frame with XX rows of individual BRFSS respondents in a given state and year and YY column variables:

cg_d_num

indicator, numeric variable of whether respondent was Caregiver (cg_d_num=1) or not (cg_d_num=0)

cg_d_fct

indicator, factor variable of whether respondent was Caregiver (cg_d_fct="CG") or not (cg_d_fct="Non-CG")

state

state FIPS code, labeled with state alphabetic abbreviation

seqno

identificaiton variable

year

Numeric year, 2014-2020

sgm_wt_raw

Original, raw sampling weight: 2014-2020

Source

BRFSS Annual Survey Data https://www.cdc.gov/brfss/annual_data/annual_data.htm.

Examples

 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

bencapistrant/brfssR documentation built on Sept. 24, 2021, 2:10 p.m.