Package 'boutliers'

Title: Outlier detection and influence diagnostics for meta-analysis
Description: A R package for implementing outlier detection and influence diagnostics for meta-analysis. Bootstrap distributions of the influence statistics are calculated, and the thresholds to determine outliers are clearly provided.
Authors: Hisashi Noma
Maintainer: Hisashi Noma <[email protected]>
License: GPL-3
Version: 1.1-1
Built: 2025-02-03 03:53:41 UTC
Source: https://github.com/nomahi/boutliers

Help Index


The 'boutliers' package.

Description

A R package for implementing outlier detection and influence diagnostics for meta-analysis. Bootstrap distributions of the influence statistics are calculated, and the thresholds to determine outliers are clearly provided.

References

Hedges, L. V., and Olkins, I. (1985). Statistical Methods for Meta-Analysis. New York: Academic Press.

Noma, H., Gosho, M., Ishii, R., Oba, K., and Furukawa, T. A. (2020+). Outlier detection and influence diagnostics in network meta-analysis. Research Synthesis Methods. https://doi.org/10.1002/jrsm.1455

Viechtbauer, W., and Cheung, M. W. (2010). Outlier and influence diagnostics for meta-analysis. Research Synthesis Methods. 1(2): 112-125. https://doi.org/10.1002/jrsm.11


Converting binary data to summary statistics

Description

Converting binary outcome data to the effect size estimates and the within studies variances vector

Usage

convert_bin(m1, n1, m2, n2, type = c("logOR", "logRR", "RD"))

Arguments

m1

A vector of the number of successes in experimental group

n1

A vector of the number of patients in experimental group

m2

A vector of the number of successes in contorol group

n2

A vector of the number of patients in contorol group

type

the outcome measure for binary outcome data (default = "logOR").

  • logOR: logarithmic odds ratio, which is defined by =log(m1+0.5)(n2m2+0.5)(n1m1+0.5)(m2+0.5)=\log \frac{(m1+0.5)(n2-m2+0.5)}{(n1-m1+0.5)(m2+0.5)}.

  • logRR: logarithmic relative risk, which is defined by =log(m1+0.5)(n2+0.5)(n1+0.5)(m2+0.5)=\log \frac{(m1+0.5)(n2+0.5)}{(n1+0.5)(m2+0.5)}.

  • RD: risk difference, which is defined by =m1n1m2n2=\frac{m1}{n1}-\frac{m2}{n2}.

Details

This function implements methods for logarithmic odds ratio, logarithmic relative risk, and risk difference described in Hartung & Knapp (2001).

Value

A data.frame of study data.

  • y: A numeric vector of the effect size estimates.

  • v: A numeric vector of the within studies variances.

References

Hartung, J., and Knapp, G. (2001). A refined method for the meta-analysis of controlled clinical trials with binary outcome. Stat Med. 20(24): 3875-3889. https://doi.org/10.1002/sim.1009

Examples

data(PPI)
attach(PPI)

dat1 <- convert_bin(d1, n1, d2, n2, type = "logOR")
print(dat1)

dat2 <- convert_bin(d1, n1, d2, n2, type = "logRR")
print(dat2)

dat3 <- convert_bin(d1, n1, d2, n2, type = "RD")
print(dat3)

Converting means and standard deviations to summary statistics

Description

Converting estimated means and standard deviations in experimental and contorol groups to the effect size estimates and the within studies variances vector

Usage

convert_mean(n1, m1, s1, n2, m2, s2, type=c("MD", "SMD"), pooled = FALSE)

Arguments

n1

A vector of number of observations in experimental group

m1

A vector of estimated mean in experimental group

s1

A vector of standard deviation in experimental group

n2

A vector of number of observations in experimental group

m2

A vector of estimated mean in experimental group

s2

A vector of standard deviation in experimental group

type

the outcome measure for continous outcome data (default = "MD").

  • MD: Mean difference.

  • SMD: Standardized mean difference.

pooled

logical; if TRUE, a pooled variance is used. The default is FALSE.

Value

A data.frame of study data.

  • y: A numeric vector of the effect size estimates.

  • v: A numeric vector of the within studies variance estimates.

Examples

data(SMT)
attach(SMT)

dat1 <- convert_mean(n1, m1, s1, n2, m2, s2, type="MD")
print(dat1)

dat2 <- convert_mean(n1, m1, s1, n2, m2, s2, type="SMD")
print(dat2)

A multicenter clinical trial data assessing the treatment effect of finasteride for benign prostatic hyperplasia

Description

  • center: Center ID

  • n1: Number of observations in finasteride group

  • m1: Mean of the change of Boyarsky score from baseline in finasteride group

  • s1: SD of the change of Boyarsky score from baseline in finasteride group

  • n0: Number of observations in placebo group

  • m0: Mean of the change of Boyarsky score from baseline in placebo group

  • s0: SD of the change of Boyarsky score from baseline in placebo group

Usage

data(PPI)

Format

A data frame with 29 rows and 7 variables

References

Gormley, G. J., Stoner, E., Bruskewitz, R. C., et al. (1992). The effect of finasteride in men with benign prostatic hyperplasia. The Finasteride Study Group. New England Journal of Medicine. 327: 1185-1191. https://www.nejm.org/doi/full/10.1056/NEJM199210223271701

Gould, A. L. (1998). Multi-centre trial analysis revisited. Statistics in Medicine. 17: 1779-1797.


Likelihood ratio test using a mean-shifted model

Description

Implementing the likelihood ratio tests using the mean-shifted model for the DerSimonian-Laird-type random-effects model. The bootstrap p-values are provided.

Usage

LRT(y, v, B=2000, alpha=0.05)

Arguments

y

A vector of the outcome measure estimates (e.g., MD, SMD, log OR, log RR, RD)

v

A vector of the variance estimate of y

B

The number of bootstrap resampling (defalt: 2000)

alpha

The significance level (default: 0.05)

Value

Results of the likelihood ratio tests involving bootstrap p-values. The outputs are ordered by the p-values.

  • id: ID of the study.

  • LR: The likelihood ratio statistic for based on the mean-shifted model.

  • Q: 1-alphath percentile for the bootstrap distribution of the likelihood ratio statistic.

  • P: The bootstrap p-value for the likelihood ratio statistic.

Examples

data(SMT)
attach(SMT)

dat <- convert_mean(n1, m1, s1, n2, m2, s2, type="MD")

LRT(dat$y, dat$v)

detach(SMT)

Likelihood ratio test using a mean-shifted model by the fixed-effect model

Description

Implementing the likelihood ratio tests using the mean-shifted model for the fixed-effect model. The bootstrap p-values are provided.

Usage

LRT_FE(y, v, B=2000, alpha=0.05)

Arguments

y

A vector of the outcome measure estimates (e.g., MD, SMD, log OR, log RR, RD)

v

A vector of the variance estimate of y

B

The number of bootstrap resampling (defalt: 2000)

alpha

The significance level (default: 0.05)

Value

Results of the likelihood ratio tests involving bootstrap p-values. The outputs are ordered by the p-values.

  • id: ID of the study.

  • LR: The likelihood ratio statistic for based on the mean-shifted model.

  • Q: 1-alphath percentile for the bootstrap distribution of the likelihood ratio statistic.

  • P: The bootstrap p-value for the likelihood ratio statistic.

Examples

data(SMT)
attach(SMT)

dat <- convert_mean(n1, m1, s1, n2, m2, s2, type="MD")

LRT_FE(dat$y, dat$v)

detach(SMT)

Crocker et al. (2018)'s patient and public involvement (PPI) intervention data

Description

  • ID: Study ID

  • d1: Number of events in PPI intervention group

  • n1: Number of observations in PPI intervention group

  • d2: Number of events in non-PPI intervention group

  • n2: Number of observations in non-PPI intervention group

Usage

data(PPI)

Format

A data frame with 21 rows and 5 variables

References

Crocker, J. C., Ricci-Cabello, I., Parker, A., Hirst, J. A., Chant, A., Petit-Zeman, S., Evans, D., Rees, S. (2018). Impact of patient and public involvement on enrolment and retention in clinical trials: systematic review and meta-analysis. BMJ. 363: k4738. https://doi.org/10.1136/bmj.k4738


Rubinstein et al. (2019)'s chronic low back pain data

Description

  • ID: Study ID

  • Souce: First author name and year of publication

  • m1: Estimated mean in experimental group

  • s1: Standard deviation in experimental group

  • n1: Number of observations in experimental group

  • m2: Estimated mean in control group

  • s2: Standard deviation in control group

  • n2: Number of observations in control group

Usage

data(SMT)

Format

A data frame with 23 rows and 8 variables

References

Rubinstein, S. M,, de Zoete, A., van Middelkoop, M., Assendelft, W. J. J., de Boer, M. R., van Tulder, M. W. (2019). Benefits and harms of spinal manipulative therapy for the treatment of chronic low back pain: systematic review and meta-analysis of randomised controlled trials. BMJ. 364: l689. https://doi.org/10.1136/bmj.l689


Studentized residuals by leave-one-out analysis

Description

Calculating the studentized residuals by leave-one-out analysis (studentized deleted residuals) and the percentiles of their bootstrap distributions.

Usage

STR(y, v, B=2000, alpha=0.95)

Arguments

y

A vector of the outcome measure estimates (e.g., MD, SMD, log OR, log RR, RD)

v

A vector of the variance estimate of y

B

The number of bootstrap resampling (defalt: 2000)

alpha

The bootstrap percentiles to be outputted; 0.5(1-alpha)th and (1-0.5(1-alpha))th pecentiles. Default is 0.95; 2.5th and 97.5th percentiles are calculated.

Value

The studentized residuals by leave-one-out analysis. The outputs are ordered by the sizes of the studentized residuals.

  • id: ID of the study.

  • psi: The studentized residuals by leave-one-out analysis (studentized deleted residuals).

  • Q1: 0.5(1-alpha)th percentile for the bootstrap distribution of the studentized residual (default: 2.5th percentile).

  • Q2: 1-0.5(1-alpha)th percentile for the bootstrap distribution of the studentized residual (default: 97.5th percentile).

Examples

data(PPI)
attach(PPI)

dat <- convert_bin(d1, n1, d2, n2, type = "logOR")
print(dat)

STR(dat$y, dat$v)

detach(PPI)

Studentized residuals by leave-one-out analysis for the fixed-effect model

Description

Calculating the studentized residuals by leave-one-out analysis (studentized deleted residuals) for the fixed-effect model and the percentiles of their bootstrap distributions.

Usage

STR_FE(y, v, B=2000, alpha=0.95)

Arguments

y

A vector of the outcome measure estimates (e.g., MD, SMD, log OR, log RR, RD)

v

A vector of the variance estimate of y

B

The number of bootstrap resampling (defalt: 2000)

alpha

The bootstrap percentiles to be outputted; 0.5(1-alpha)th and (1-0.5(1-alpha))th pecentiles. Default is 0.95; 2.5th and 97.5th percentiles are calculated.

Value

The studentized residuals by leave-one-out analysis. The outputs are ordered by the sizes of the studentized residuals.

  • id: ID of the study.

  • psi: The studentized residuals by leave-one-out analysis (studentized deleted residuals).

  • Q1: 0.5(1-alpha)th percentile for the bootstrap distribution of the studentized residual (default: 2.5th percentile).

  • Q2: 1-0.5(1-alpha)th percentile for the bootstrap distribution of the studentized residual (default: 97.5th percentile).

Examples

data(PPI)
attach(PPI)

dat <- convert_bin(d1, n1, d2, n2, type = "logOR")
print(dat)

STR_FE(dat$y, dat$v)

detach(PPI)

Variance ratio influential statistics

Description

Calculating the variance ratio influential statistics by leave-one-out analysis and the percentiles of their bootstrap distributions.

Usage

VRATIO(y, v, B=2000, alpha=0.05)

Arguments

y

A vector of the outcome measure estimates (e.g., MD, SMD, log OR, log RR, RD)

v

A vector of the variance estimate of y

B

The number of bootstrap resampling (defalt: 2000)

alpha

The bootstrap percentile to be outputted (default: 0.05)

Value

The variance ratio influential statistics by leave-one-out analysis and their bootstrap percentiles. The outputs are ordered by the sizes of the variance ratio statistics.

  • id: ID of the study.

  • VR: The VRATIO statistic (relative change of the variance of the overall estimator) by leave-one-out analysis.

  • Q1: alphath percentile for the bootstrap distribution of the VRATIO statistic.

  • TR: The TAU2RATIO statistic (relative change of the heterogeneity variance) by leave-one-out analysis.

  • Q2: alphath percentile for the bootstrap distribution of the TAU2RATIO statistic.

Examples

data(finasteride)
attach(finasteride)

dat <- convert_mean(n1, m1, s1, n0, m0, s0, type="MD")
print(dat)

VRATIO(dat$y, dat$v)

detach(finasteride)