Learn R Programming

What does mdsstat do?

The mdsstat package:

  • Standardizes the output of various statistical trending algorithms
  • Allows running of multiple algorithms on the same data
  • Allows running of both disproportionality and quality control algorithms
  • Creates lightweight analysis definitions and output files for auditability, documentation, and reproducibility

Why?

There are many ways to trend medical device event data. Some are drawn from the quality control discipline, others from disproportionality analysis used in pharmacoepidemiology, and yet others from the general field of statistics.

There is a need to rigorously compare and contrast these various methods to more fully understand their respective performance and applicability in surveillance of medical devices.

How?

The mdsstat package aims to provide a collection of statistical trending algorithms used in medical device surveillance. Furthermore, each algorithm is written with a standardized, reusable framework philosophy. The same input data can be fed through multiple algorithms. All algorithms return results that can be sorted, stacked, and compared.

This package is written in tandem with the mds package. These are complementary in the sense that:

  • mds standardizes medical device event data.
  • mdsstat standardizes the statistical trending of medical device event data.

While mdsstat algorithms can run on generic R data frames, additional efficiency and traceability benefits are derived by running on data frames generated by mds::time_series() from the mds package.

The Algorithms

This is the current list of algorithms available:

FunctionDescription
xbar()Shewhart x-bar Control Chart with 4 Western Electric Rules
cusum()Cumulative Sum Control Chart with 4 Western Electric Rules
ewma()Exponentially Weighted Moving Average
sprt()Sequential Probability Ratio Test
prr()Proportional Reporting Ratio
ror()Reporting Odds Ratio
gps()Gamma Poisson Shrinker (containing EBGM and EB05)
bcpnn()Bayesian Confidence Propagation Neural Network
cp_mean()Mean-Shift Changepoint
poisson_rare()Poisson Test on Rare Events

Refer to the package vignette for guided examples.

Copy Link

Version

Install

install.packages('mdsstat')

Monthly Downloads

57

Version

0.3.2

License

GPL-3

Maintainer

Gary Chung

Last Published

March 8th, 2020

Functions in mdsstat (0.3.2)

poisson_rare

Poisson for Rare Events
mds_ts

Sample List of mds_ts Time Series
maude

Bone Cement MAUDE Events in 2017
next_dev

Return next level up device Returns the variable name of the next level in the device hierarchy
shewhart

Shewhart x-bar Control Chart
lrt

Likelihood Ratio Rest
cusum

Cumuluative Sum (CUSUM)
ror

Reporting Odds Ratio
run_algos

Run Multiple Algorithms
next_ev

Return next level up event Returns the variable name of the next level in the event hierarchy
xbar

x-bar Control Chart
sprt

Sequential Probability Ratio Test
test_as_row

Coerce mdsstat Test to 1-Row Data Frame
prr

Proportional Reporting Ratio
sales

Simulated Device Sales Data
input_param_checker

Check Input Parameters
define_algos

Set List of Algorithms to Run
ewma

Exponentially Weighted Moving Average (EWMA)
gps

Empirical Bayes Gamma-Poisson Shrinker
fNA

Min/Max With All NA's Allowed Min and Max functions that allows the vector x to be NA, where f is min or max
bcpnn

Bayesian Confidence Propagation Neural Network
cp_mean

Mean-Shift Changepoint
E2x2

Calculate expected for 2x2 table of observed Returns a vector of expected in the same order as input
char_to_df

Character Vector to Header of Empty Data Frame Converts a character vector into the column names of an empty data frame. Used in conjunction with check_names parameter of input_param_checker()
convert_date

Convert to Acceptable Date