mederrData-class: Class "mederrData". Data Specification for Identifying the...

Description Objects from the Class Slots Methods Author(s) References See Also Examples

Description

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).

Objects from the Class

Objects can be created by calls of the form new("mederrData", data), where the data argument has to be a matrix or a data frame object that contains the following (numeric) information for each error profile/hospital combination:

  1. the number of times (y) that profile i in hospital j was reported with harm;

  2. the total number of times (N) that the error profile i is cited on a report from hospital j,

  3. the error profile i identification code,

  4. the hospital j identification code.

Slots

data:

Object of class "data.frame"; data in the standard data.frame form.

size:

Object of class "numeric"; total number of observations in the data set.

numi:

Object of class "numeric"; number of error profiles available in the data set.

numj:

Object of class "numeric"; number of hospitals available in the data set.

Methods

plot

signature(x = "mederrData", y = "missing"): Provides a pictorial representation for a sample of error profiles reported by some hospitals.

summary

signature(object = "mederrData"): Summarizes information about an mederrData object.

Author(s)

Sergio Venturini [email protected],

Jessica A. Myers [email protected]

References

Myers, J. A., Venturini, S., Dominici, F. and Morlock, L. (2011), "Random Effects Models for Identifying the Most Harmful Medication Errors in a Large, Voluntary Reporting Database". Technical Report.

See Also

bayes.rank, bhm.mcmc, bhm.resample, mixnegbinom.em.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ng <- 50
i <- rep(1:ng, ng)
j <- rep(1:ng, each = ng)
N <- rpois(ng^2, 3 + .05*i - .01*j) + 1

theta_i <- rgamma(ng, 5, 5) - 4/5
delta_j <- rnorm(ng, 0, .2)
logit <- -3 + theta_i[i] + delta_j[j]
y <- rbinom(ng^2, N, exp(logit)/(1 + exp(logit)))

simdata <- new("mederrData", data = cbind(y, N, i, j))

mederrRank documentation built on May 30, 2017, 2:55 a.m.