brfss_emspt: BRFSS Emotional Support (EmSpt) and Life Satisfaction Data

Description Usage Format Source Examples

Description

BRFSS Emotional Support (EmSpt) and Life Satisfaction Module Questions asked from 2015-2017 (no states included this module in 2018)

Usage

1

Format

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

emsup_d_fct

factor, dichotomous Sometimes+, Rarely/Never

emsup_cat_fct

factor, categorical Always, Usually, Sometimes, Rarely, Never

lsat_d_fct

factor, dichotomous Satisfied/Dissatisfied

lsat_cat_fct

factor, categorical Very Satisfied, Satisfied, Dissatisfied, Very Dissatisfied

x_state

numeric variable of state

state

state FIPS code, labeled with state alphabetic abbreviation

seqno

identificaiton variable

year

Numeric year: 2014-2017

x_psu

Primary Sampling Unit Variable

x_ststr

Sampling Strata Variable

emspt_wt_raw

Original,raw sampling weight: 2014-2017

version_emspt

Character, Version of data: Core (X_LLCPWT), V1 (X_LCPWTV1), V2(X_LCPWTV2), V3 (X_LCPWTV3)

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
# To adjust the sampling weight (emspt_wt_raw) by dividing the
# sampling weight by the number of instances a state is in the data, run:
library(tidyverse)
data(brfss_emspt)
waves<-brfss_emspt %>%
  filter(year %in% 2016:2017) %>% #keeping only 2016-2017 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_emspt<-full_join(brfss_emspt,waves,by="state") %>%
  mutate(emspt_wt_adj = emspt_wt_raw/wave) #adjusting the weight by number of waves

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