div_calc | R Documentation |
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
)
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.