TestDisparity {aides}R Documentation

Test assumption of disparities in sample size.

Description

TestDisparity() is a function for disparities in sample size analysis.

Usage

TestDisparity(
  n,
  data = NULL,
  study = NULL,
  time = NULL,
  outlier = NULL,
  ctf = 0.2,
  vrblty = NULL,
  ctfLwr = 0.1,
  ctfUpr = 0.3,
  rplctns = 1000,
  plot = FALSE,
  sort = NULL,
  color = "firebrick3"
)

Arguments

n

NUMERIC values for sample size (n) of each study.

data

DATA FRAME consists of columns for study label, study year, and sample size.

study

CHARACTER for study labels.

time

NUMERIC values of time sequence.

outlier

CHARACTER for method of outlier detection. Current version consists of four methods, and three of them can be used for normal distribution. The rest one method can be used for data with non-normal distribution. For normal distribution data, outlier detection can be performed using 1.5 interquartile range method ("IQR"), z score method ("Z"), and generalized extreme studentized deviate method ("GESD"). For data with non-normal distribution, package aides detects outliers using median absolute deviation method ("MAD"). Parameter outlier with argument "Default" automatically takes "GESD" or "MAD" based on data distribution.

ctf

NUMERIC value of cutoff point for proportion of excessive cases in outlier-based disparity test, and the value should be larger than 0.

vrblty

CHARACTER for method of variability detection. Current version consists of two methods in terms of coefficient of variation (CV) and robust CV (RCV) using MAD. For normal distribution data, variability detection can be performed common CV method, and MAD based RCV could be used for data with non-normal distribution. Default argument for parameter vrblty is "CV" in order to detect variability.

ctfLwr

NUMERIC value of cutoff value for lower boundary of variability that should be larger than 0.

ctfUpr

NUMERIC value of cutoff value for upper boundary of variability that should be larger than ctfLwr.

rplctns

INTEGER value of bootstrap replications for obtaining probability of variability-based disparity test, and the integer must be equal or larger than 1,000.

plot

LOGIC value for indicating whether to illustrate proportion of excessive cases plot.

sort

CHARACTER of data sorting reference for disparity plot. Current version consists of "time", "size", and "excessive" for displaying observations on disparity plot of outlier(s).

color

CHARACTER of a color name for emphasizing the significant disparities in sample size.

Value

TestDisparity() returns a summary of result regarding disparities in sample size, and can be stored as an object in disparity class. Explanations of returned information are listed as follows:

disparity

String to return the overall judgement of disparity test.

w.normality

A numeric value of statistics of normality test to show whether sample sizes among studies are distributed normally.

p.normality

A numeric value of p-value of normality test to show whether sample sizes among studies are distributed normally.

outlier.method

String shows outlier detection method used in disparity test.

vrblty.method

String shows variability detection method used in disparity test.

outlier

A data frame to show details of identified outliers (studies).

prop.outlier

A numeric value to show proportion of outliers among all studies.

n.excessive

A numeric value of excessive cases among all samples.

p.prop.outlier

A numeric value of p-value of disparity outlier test.

lci.prop.outlier

A numeric value for lower limit of 95% confidence interval of disparity outlier test.

uci.prop.outlier

A numeric value for upper limit of 95% confidence interval of disparity outlier test.

variability

A numeric value to show variability among all studies.

p.variability

A numeric value of p-value of disparity variability test.

lci.variability

A numeric value for lower limit of 95% confidence interval of disparity variability test.

uci.variability

A numeric value for lower limit of 95% confidence interval of disparity variability test.

Author(s)

Enoch Kang

References

Shapiro, S. S., & Wilk, M. B. (1965). An analysis of variance test for normality (complete samples). Biometrika, 52(3), 591-611.

Rosner, B. (1983). Percentage Points for a Generalized ESD Many-Outlier Procedure. Technometrics, 25(2), 165-172.

Leys, C., Ley, C., Klein, O., Bernard, P., & Licata, L. (2013). Detecting outliers: Do not use standard deviation around the mean, use absolute deviation around the median. Journal of experimental social psychology, 49(4), 764-766.

Rousseeuw, P. J. & Croux C. (1993). Alternatives to the Median Absolute Deviation, Journal of the American Statistical Association, 88(424), 1273-1283. http://dx.doi.org/10.1080/01621459.1993.10476408

Hendricks, W. A., & Robey, K. W. (1936). The sampling distribution of the coefficient of variation. The Annals of Mathematical Statistics, 7(3), 129-132.

Sokal, R. R., & Braumann, C. A. (1980). Significance tests for coefficients of variation and variability profiles. Systematic Biology, 29(1), 50-66.

See Also

TestDiscordance, PlotDisparity

Examples

## Not run:
# 1. Import a dataset of study by Olkin (1995)
library(meta)
data("Olkin1995")
data <- Olkin1995

# 2. Calculate total sample size and standard error of each study
data$n  <- data$n.exp + data$n.cont

# 3. Test disparities in sample sizes
output <- TestDisparity(n, data, author, year)

# 4. Illustrate disparity plot
TestDisparity(n, data, author, year, plot = TRUE)

## End(Not run)


[Package aides version 1.3.3 Index]