outlier_detector: Detect outliers in a rainbow plot for arbitrary constant c

Description Usage Arguments Value Examples

View source: R/outlier_detector.R

Description

Takes the result of an nma.fit call and produces a list of trials and arms which are outliers. Outliers are defined by lying outside the curve x^2+y=c for constant c. By default, c is chosen to be 3 as in Dias et. al 2011, but can be specified to any other constant.

Usage

1

Arguments

obj

An nma.fit object called upon an nma.model.

c

The constant c used to define outliers in the curve x^2+y=c.

Value

A data frame with the trials and arms that are poorly fit, along with the deviance residual and leverage. If no outliers exist for the specified c, a printed message appears.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data("thrombolytic")
data_thrombo <- data.prep(arm.data = thrombolytic, varname.t = "treatment", varname.s = "study")
fe_model <- nma.model(data = data_thrombo, outcome = "events", N = "sampleSize",
reference = "tPA", family = "binomial", link = "logit",
effects = "fixed")
fe_results <- nma.run(model = fe_model, n.adapt = 1000, n.burnin = 1000, n.iter = 10000)
diabetes.fit <- nma.fit(fe_results, main = "Consistency model")
outlier_detector(diabetes.fit)

## End(Not run)

augustinewigle/StanNet documentation built on July 21, 2020, 12:13 a.m.