Learn R Programming

staggR (version 0.1.1)

hosp: Hospitalization data

Description

A simulated data set of 15 counties, 11 of which implemented a policy intervention during 2015 - 2018 to reduce hospitalizations. The data set is longitudinal, with each row corresponding to an individual-year.

Usage

hosp

Arguments

Format

hosp

A data frame with 31,040 rows and 10 columns:

guid

Character vector containing globally unique identifiers for individuals living in the 15 counties

county

Character vector containing county names

intervention_dt

Dates on which each county implemented their policy intervention to reduce hospitalizations

intervention_yr

Character vector containing the year during which intervention_dt takes place

age

Integer containing individuals' ages. Time-varying by year.

sex

Character vector containing individuals' sexes. Not time-varying.

comorb

Logical indicating whether each individual has comorbidities. Time-varying by year.

cohort

Character vector identifying the intervention cohort to which each individual belongs. Takes values 0, 5, 6, 7, or 8, corresponding to counties that implemented the intervention not at all or during 2015, 2016, 2017, or 2018, respectively. Invariant within counties.

yr

Character vector representing the observation year for each row.

hospitalized

Integer indicating whether the individual was hospitalized during the current year.

Details

Consider a policy intervention designed to reduce inpatient hospitalizations in 15 counties. This longitudinal data set has one row per individual-year. Each individual is identified by a globally unique identifier (guid), and we have measures of the individuals' ages, sexes, and comorbidities, and a column indicating whether the individual was hospitalized during the current year.

The column intervention_yr tells us the year during which each county implemented the intervention. If intervention_yr is NA, we can conclude that the county never implemented the intervention. Among the 15 counties, 3 implemented the intervention in 2015; 2 counties implemented in 2016; 5 counties implemented in 2017; 1 county implemented in 2018; and 4 counties did not implement the intervention at all during the study period, which runs for 11 years, from 2010 through 2020.