Title: | Healthcare Antitrust Analysis |
---|---|
Description: | Antitrust analysis of healthcare markets. Contains functions to implement the semiparametric estimation technique described in Raval, Rosenbaum, and Tenn (2017) "A Semiparametric Discrete Choice Model: An Application to Hospital Mergers" <doi:10.1111/ecin.12454>. |
Authors: | Matthew T Panhans [aut, cre] |
Maintainer: | Matthew T Panhans <[email protected]> |
License: | CC0 |
Version: | 0.1.4.9999 |
Built: | 2025-01-30 05:22:42 UTC |
Source: | https://github.com/mpanhans/healthcare.antitrust |
Take a dataset of hospital discharges, and assigns them to cells that meet a minimum threshold cell size.
cell_defn(data, min_size, layers, count = "count", expandLayers = FALSE)
cell_defn(data, min_size, layers, count = "count", expandLayers = FALSE)
data |
Dataset of discharges. |
min_size |
Minimize cell size. |
layers |
A list of lists. Each layer is a list of the variables on which observations will be allocated to cells. The layers should be ordered in decreasing refinement, so that observations not assigned to a cell meeting the minimum size threshold can be assigned by a more coarse layer. |
count |
Name of variable which indicates the number of admissions
represented by an observation. Default variable name is |
expandLayers |
logical; if only a single layer is given, setting this to TRUE will expand the layer to a set of layers where each layer drops the last variable in the list of the previous layer. |
If the variable count
is not available, the function will assume that
each observation represents one admission, and a variable count
will
be created in the output data frame to indicate this.
When assigning observations to cells in a given layer, this function only assigns observations that have not been previously assigned in a finer layer. That is, the function assigns observations without replacement. Assignment with replacement is currently not supported.
For more details see the example vignette by typing:
vignette("semipar_example", package = "healthcare.antitrust")
A list of data frames. The first component in the list, assigned
,
is the original data frame, with observations assigned to cells, and
excluding observations that were not assigned. The assigned cells are
designated by the variable cell
, and the layer number in
which the observation is assigned to the cell is given by the variable
cell_type
. The second component of the list, unassigned
, is a
data frame with the unassigned observations.
data(discharge_data, package = "healthcare.antitrust") list1 <- c("drg","age","zip5") layers <- list(list1) th <- 15 discharge_data$count <- 1 outList <- cell_defn(discharge_data,th,layers)
data(discharge_data, package = "healthcare.antitrust") list1 <- c("drg","age","zip5") layers <- list(list1) th <- 15 discharge_data$count <- 1 outList <- cell_defn(discharge_data,th,layers)
A simulated dataset of hospital discharges containing patient characteristics.
discharge_data
discharge_data
A data frame with 1,200 rows (one for each discharge) and 7 variables:
diagnosis related group (drg) code for the admission
patient age
patient 5 digit zip code of residence
hospital identifier
hospital name
system identifier
system name
Created as part of healthcare.antitrust package.
Calculates provider-level diversion ratios, once cells have been defined.
div_calc( data, cell = "cell", provider_id = "provider_id", provider = "provider", sys_id = "sys_id", focal_sys_id = NULL, party_ind = "party_ind", count = "count", dropDegenerateCell = TRUE, hosp_id = NA, hospital = NA )
div_calc( data, cell = "cell", provider_id = "provider_id", provider = "provider", sys_id = "sys_id", focal_sys_id = NULL, party_ind = "party_ind", count = "count", dropDegenerateCell = TRUE, hosp_id = NA, hospital = NA )
data |
Dataset of patient choices, with required variables:
|
cell |
Name of variable specifying cell to which each observation
has been allocated. Default variable name is |
provider_id |
Name of variable specifying (numeric) provider
identifier. Default variable name is |
provider |
Name of variable specifying (string) provider name.
Default variable name is |
sys_id |
Name of variable specifying (numeric) system identifier.
Default variable name is |
focal_sys_id |
numeric; list of sys_id's specifying systems of interest for which diversions will be calculated from. For a merger, this will typically be the system identifies of the merging parties. |
party_ind |
deprecated; use focal_sys_id instead. |
count |
Name of variable indicating the number of admissions represented by the observation. Set = 1 for every row if each observation represents one admission. |
dropDegenerateCell |
logical; specifies how to treat cells with a 100 percent within-system share. If TRUE, observations in degenerate, 100 percent share cells will be ignored in the diversion ratio calculation. If FALSE, any such individuals will be assigned to the outside option, but still included in the denominator, so that the inside-option diversion will total less than 100 percent. |
hosp_id |
deprecated; use provider_id instead. |
hospital |
deprecated; use provider instead. |
For system-to-system diversions, set provider_id
and
provider
equal to corresponding system-level identifiers.
Diversions then reflect that patients are not allowed to divert to
within-system alternative providers
For more details see the example vignette by typing:
vignette("semipar_example", package = "healthcare.antitrust")
A list with two components. The first component, provider_level
,
is a matrix giving provider-level diversions from party providers to
all other providers The second object, sys_level
, is a matrix that
aggregates party providers to systems, thus giving diversions from party
systems to all other providers
data(discharge_data, package = "healthcare.antitrust") list1 <- c("drg","age","zip5") layers <- list(list1) th <- 15 discharge_data$count <- 1 outList <- cell_defn(discharge_data,th,layers) D0 <- outList$assigned out <- div_calc(D0, provider_id = "hosp_id", provider = "hospital", focal_sys_id = c(1,5))
data(discharge_data, package = "healthcare.antitrust") list1 <- c("drg","age","zip5") layers <- list(list1) th <- 15 discharge_data$count <- 1 outList <- cell_defn(discharge_data,th,layers) D0 <- outList$assigned out <- div_calc(D0, provider_id = "hosp_id", provider = "hospital", focal_sys_id = c(1,5))
This function calculates the system-level Willingness-To-Pay.
wtp_calc( data, cell = "cell", sys_id = "sys_id", count = "count", weight = "weight", dropDegenerateCell = TRUE )
wtp_calc( data, cell = "cell", sys_id = "sys_id", count = "count", weight = "weight", dropDegenerateCell = TRUE )
data |
Dataset of hospital discharges. Required variables:
|
cell |
Name of variable specifying cell to which each observation
has been allocated. Default variable name is |
sys_id |
Name of variable specifying (numeric) system identifier.
Default variable name is |
count |
Name of variable indicating the number of admissions represented by the observation. Set = 1 for every row if each observation represents one admission. |
weight |
Name of variable indicating designated weight of admission; =1 if observations should be equally weighted. |
dropDegenerateCell |
logical; specifies how to treat cells with a 100 percent within-system share. If TRUE, observations in degenerate, 100 percent share cells will be ignored in the WTP calculation. If FALSE, an adjustment is made where any cells with > 99 percent share at a single hospital have the share set to 99.0 percent. |
This function calculates the system-level WTP. For use in a WTP
simulation exercise of the "WTP/Q Method" described in Brand and Balan
(2018) doi:10.2139/SSRN.3153109.
Hospital systems need to be numbered by sys_id
, with a distinct
sys_id
for each independent hospital.
The weight
input might for example be a DRG weight for each inpatient
hospital admission.
For more details see the example vignette by typing:
vignette("semipar_example", package = "healthcare.antitrust")
A data frame with the number of rows equal to the number of systems
in the input data frame, and the following variables: sys_id
is the system
identifier, WTP_s
is the system's WTP, N_s
is the number of admission
for the system, and WTP_s_wt
is the weighted WTP for the system
if the weight input is provided.
data(discharge_data, package = "healthcare.antitrust") list1 <- c("drg","age","zip5") layers <- list(list1) th <- 15 discharge_data$count <- 1 outList <- cell_defn(discharge_data,th,layers) D0 <- outList$assigned out <- wtp_calc(D0)
data(discharge_data, package = "healthcare.antitrust") list1 <- c("drg","age","zip5") layers <- list(list1) th <- 15 discharge_data$count <- 1 outList <- cell_defn(discharge_data,th,layers) D0 <- outList$assigned out <- wtp_calc(D0)