This function represents the "constructor" function for the resampling procedure used in this package. bhm.resample calculates the importance ratios, and performs the sampling, and then this function constructs the resampled model based on that information.
mederrResample-class
(Package: mederrRank) :
Class "mederrResample". Simulated Monte Carlo Chains (Step 2) for the Bayesian Hierarchical Model Used to Identify the Most Harmful Medication Errors.
This class encapsulates the information needed to resample the Monte Carlo chains for the Bayesian Hierarchical Model as described in Myers et al. (2011) using user defined values for k and eta.
mederrData-class
(Package: mederrRank) :
Class "mederrData". Data Specification for Identifying the Most Harmful MEdication Errors using a Bayesian Hierarchical Model.
This class encapsulates the data specification for a Bayesian Hierarchical Model used to identify the most harmful medication errors as described in Myers et al. (2011).
This function computes the log-likelihood difference for the candidate θ_i random effects. It is a helper function and not meant to be used on its own.
This function provides the empirical Bayes estimates for the parameters theta of a negative binomial distribution (see dnegbinom) using an Expectation-Maximization algorithm.