Description Usage Arguments Value Examples
View source: R/outlier_detector.R
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.
1 | outlier_detector(obj, c)
|
obj |
An |
c |
The constant c used to define outliers in the curve x^2+y=c. |
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.