fitBabyMonitor: Fit Baby-MONITOR for CPQCC/VON

Description Usage Arguments Value

View source: R/fitBabyMonitor.R

Description

fitBabyMonitor applies the Baby-MONITOR score to a single performance indicator. Designed for CPQCC/VON usage.

Usage

1
2
3
4
5
6
fitBabyMonitor(minimal_data, num_cat, num_cont, subset = FALSE,
  subset_base_catgory = 1, var_intercept = 40, var_cat = 10,
  var_cat_interaction = 10, var_cont = 10, iters = 100, burn_in = 100,
  alpha = 0.01, n_cutoff = 5, bonferroni = TRUE, t_scores = TRUE,
  outcome_na = "set0", subset_na = "category", cat_na = "category",
  cont_na = "median", score_type = "stat_z_scaled", dat_out = FALSE)

Arguments

minimal_data

Data_frame with a particular format:

1st column: Outcome vector (0-1 encoding)

2nd column: Institution ID

3rd column: Subset (if subset == TRUE):

Next: num_cat columns of categorical variables (num_cat can equal 0)

Next: num_cont columns of continuous variables (num_cont can equal 0)

num_cat

integer. Number of categorical risk adjusters.

num_cont

integer. Number of continious risk adjusters.

subset

logical; if TRUE perform analysis with a subset variable ( and minimal_data must have subset data in the 3rd column)

var_intercept

scalar. Prior variance for the intercept.

var_cat

scalar. Prior variance for categorical risk adjuster parameters.

var_cat_interaction

scalar. Prior variance for interactions between categorical risk adjusters.

var_cont

scalar. Prior variance for continuous risk adjusters.

iters

integer. Desired number of posterior MCMC iterations.

burn_in

integer. Number of 'burn-in' MCMC iterations to discard.

alpha

scalar in (0,1). Statistical signifiance threshold. Posterior (1-alpha)% intervals are generated.

bonferroni

logical; if TRUE, posterior intervals are widened with the Bonferroni correction.

t_scores

logical; if TRUE, posterior intervals confidence intervals constructed with the student t-distribution. If FALSE, z-scores are used.

outcome_na

Method for handling any NA values in the outcome vec. 'remove' removes rows with NA outcomes while 'set0' keeps the row and sets the outcome to 0.

subset_na

Method for handling any NA subset values. 'remove' removes rows with NA subset values while 'category' makes a new subset category (coded as 99) for NA values.

cat_na

Method for handling any NA values in the categorical risk adjusters. 'remove' removes rows with NA values while 'category' makes a new category (coded as 99) for NA catorical risk adjusters.

cont_na

Method for handling any NA values in the continous risk adjusters. 'remove' removes rows with NA values while 'median' replaces NA with the median value of the risk adjuster.

dat_out

logical; if TRUE, export MCMC iterations and other parameters in the dat component.

Value

Returns a large list with the following components:

inst_mat: Matrix (one row per institution) computing summary statistics, DGH institution ranking, and intervals with both effect-size and standardized scores.

full_subset_mat_baseline, full_subset_mat_nobaseline: Matrix with rankings and intervals for the various subset categories.

subset_baseline_mat, subset_nobaseline_mat: Matrix with rankings and intervals for subset categories within institution.

group_labels: A vector of the names of each institution

mcmc_fit: Matrix of MCMC iterations for each coefficient dg_z: Matrix of computed z score for each institution at each MCMC iterations.

coefs: Names of each coefficient (1st is intercept, then institution, then everything else)

prior_var_vec: Vector of prior variances for each coefficient

model_matrix: Design matrix


dhelkey/dghrank documentation built on April 21, 2020, 9:11 a.m.