puni_star: p-uniform*

View source: R/puni_star.R

puni_starR Documentation

p-uniform*

Description

Function to apply the p-uniform* method for one-sample mean, two-independent means, and one raw correlation coefficient as described in van Aert and van Assen (2023).

Usage

puni_star(
  mi,
  ri,
  ni,
  sdi,
  m1i,
  m2i,
  n1i,
  n2i,
  sd1i,
  sd2i,
  tobs,
  yi,
  vi,
  alpha = 0.05,
  side,
  method = "ML",
  boot = FALSE,
  control
)

Arguments

mi

A vector of group means for one-sample means

ri

A vector of raw correlations

ni

A vector of sample sizes for one-sample means and correlations

sdi

A vector of standard deviations for one-sample means

m1i

A vector of means in group 1 for two-independent means

m2i

A vector of means in group 2 for two-independent means

n1i

A vector of sample sizes in group 1 for two-independent means

n2i

A vector of sample sizes in group 2 for two-independent means

sd1i

A vector of standard deviations in group 1 for two-independent means

sd2i

A vector of standard deviations in group 2 for two-independent means

tobs

A vector of t-values

yi

A vector of standardized effect sizes (see Details)

vi

A vector of sampling variances belonging to the standardized effect sizes (see Details)

alpha

A numerical value specifying the alpha level as used in primary studies (default is 0.05 but see Details).

side

A character indicating whether the effect sizes in the primary studies are in the right-tail of the distribution (i.e., positive) or in the left-tail of the distribution (i.e., negative) (either "right" or "left")

method

A character indicating the method to be used "ML" (default), "P", or "LNP"

boot

A logical indicating whether the p-value of testing whether the between-study variance is zero for methods P and LNP should be obtained by means of a parametric bootstrap. The default value is FALSE.

control

An optional list of elements that give the user more control over the optimization and root-finding algorithms (see Note)

Details

Three different effect size measures can be used as input for the puni_star function: one-sample means, two-independent means, and raw correlation coefficients. Analyzing one-sample means and two-independent means can be done by either providing the function group means (mi or m1i and m2i), standard deviations (sdi or sd1i and sd2i), and sample sizes (ni or n1i and n2i) or t-values (tobs) and sample sizes (ni or n1i and n2i). Both options should be accompanied with input for the arguments side, method, and alpha. See the Example section for examples. Raw correlation coefficients can be analyzed by supplying the raw correlation coefficients ri and sample sizes and ni to the puni_star function next to input for the arguments side, method, and alpha. Note that the method internally transforms the raw correlation coefficients to Fisher's z correlation coefficients. The output of the function also shows the results for the Fisher's z correlation coefficient. Hence, the results need to be transformed to raw correlation coefficients if this is preferred by the user.

It is also possible to specify the standardized effect sizes and its sampling variances directly via the yi and vi arguments. However, extensive knowledge about computing standardized effect sizes and its sampling variances is required and specifying standardized effect sizes and sampling variances is not recommended to be used if the p-values in the primary studies are not computed with a z-test. In case the p-values in the primary studies were computed with, for instance, a t-test, the p-values of a z-test and t-test do not exactly coincide and studies may be incorrectly included as a statistically significant or nonsignificant effect size. Furthermore, critical values in the primary studies are not transformed to critical z-values if yi and vi are used as input. This yields less accurate results.

The puni_star function assumes that two-tailed hypothesis tests were conducted in the primary studies. In case one-tailed hypothesis tests were conducted in the primary studies, the submitted alpha argument to the puni_star function has to be multiplied by two. For example, if one-tailed hypothesis tests were conducted with an alpha level of .05, an alpha of 0.1 has to be submitted to the puni_star function.

Note that only one effect size measure can be specified at a time. A combination of effect size measures usually causes true heterogeneity among effect sizes and including different effect size measures is therefore not recommended.

Selecting a method

Three different methods are currently implemented in the puni_star function. The ML method refers to maximum likelihood estimation of the effect size and the between-study variance. Profile likelihood confidence intervals around the estimates are computed by means of inverting the likelihood-ratio test. Likelihood-ratio tests are used for testing the null hypotheses of no effect and no between-study variance. The ML method is the recommended method for applying p-uniform*.

The two other methods (P and LNP) are moment based estimators. The method P is based on the distribution of the sum of independent uniformly distributed random variables (Irwin-Hall distribution) and the LNP method refers to Fisher's method (1950, Chapter 4). For these methods, a p-value for testing the null hypothesis of no between-study variance can also be obtained by means of a parametric bootstrap. This is necessary since the data is otherwise first used for estimating the effect size in the procedure for testing the null hypothesis of no between-study variance and then also used for computing a p-value. The test of no effect is not available for the methods P and LNP and the publication bias test for these methods is not yet implemented.

Value

est

p-uniform*'s effect size estimate

ci.lb

lower bound of p-uniform*'s 95% confidence interval of the effect size

ci.ub

upper bound of p-uniform*'s 95% confidence interval of the effect size

L.0

test statistic of p-uniform*'s test of the null hypothesis of no effect

pval.0

one-tailed p-value of p-uniform*'s test of null hypothesis of no effect

tau2

p-uniform*'s estimate of the between-study variance

tau2.lb

lower bound of p-uniform*'s 95% confidence interval of the between-study variance

tau2.ub

upper bound of p-uniform*'s 95% confidence interval of the between-study variance

L.het

test statistic of p-uniform*'s test of the null hypothesis of no between-study variance

pval.het

one-tailed p-value of p-uniform*'s test of null hypothesis of no between-study variance

pval.boot

one-tailed p-value of p-uniform*'s test of null hypothesis of no between-study variance obtained with a parametric bootstrap

...

a number of additional elements

Note

The control argument in the puni_star function is an optional argument that gives the user more control over the optimization and root-finding algorithms. This can be especially useful if estimation of the method does not converge and NAs are returned by the function. The control argument should be specified as a list containing one or more elements. For example, control = list(verbose = TRUE) Default values are used if an element is not specified. The following elements can be specified by the user:

  • proc.ml: A character indicating with optimization procedure should be used for the method ML. The initial implementation of p-uniform* iteratively optimized the profile log-likelihood functions. As of version 0.2.6 of this package, the default optimization routine estimates both parameters at the same time. The old optimization procedure can be used by specifying proc.ml = "prof".

  • stval.d: An integer that is the starting value of the effect size for estimation. This starting value is used for the method ML and is only needed when both parameters are estimated at the same time. See argument proc.ml for more information. The default value is the mean of the effect sizes in the meta-analysis.

  • stval.tau: An integer that is the starting value of tau for estimation. This starting value is used for the methods ML, P, and LNP. The default value is the standard deviation of the effect sizes in the meta-analysis.

  • int: A vector of length two that indicates the lower and upper bound of the interval that is used for estimating the effect size. The effect size estimate should be included in this interval. This interval is used for the methods ML, P, and LNP and its default values are (-2, 2).

  • bounds.int A vector of length two that is used for determining the bounds for estimating the effect size with P and LNP. The default values are a function of the yi. The lower bound is the minimum yi minus 1 and the upper bound is the maximum yi plus 1. The effect size has to be between the lower and upper bound.

  • tau.int: A vector of length two that indicates the lower and upper bound of the interval that is used for estimating the between-study variance. The estimate of the between-study variance should be included in this interval. This interval is used for the methods ML, P, and LNP and its default values are (0, 2).

  • est.ci: A vector of length two indicating the values that are subtracted from and added to the estimate of the effect size for computing the 95% confidence intervals. This vector is used for the methods ML, P, and LNP and its default values are (3, 3). To give an example, estimates for the lower and upper bound around the effect size estimate are searched on the interval (est-3, est) and (est, est+3), respectively.

  • tau.ci: A vector of length two indicating the values that are added to the estimate of the between-study variance for computing the 95% confidence intervals. This vector is used for the methods ML, P, and LNP and its default values are (3, 1).

  • tol: A number indicating the desired accuracy of the estimates. This number is used for the methods ML, P, and LNP and its default value is 0.001.

  • maxit: An integer indicating the maximum number of iterations that is used for estimating the effect size and between-study variance. This number is used for the methods ML, P, and LNP and its default value is 300.

  • fnscale: An integer that can be used for scaling the log-likelihood value in the optimization. fnscale is one of the control arguments of the optim() function that is internally used for optimization when the ML method is used and both parameters are estimated at the same time. See the argument proc.ml above #' and the documentation of the optim() function for more information.

  • verbose: A logical indicating whether information should be printed about the algorithm for estimating the effect size and between-study variance. This logical is used for the methods ML, P, and LNP and its default value is FALSE.

  • reps: An integer indicating the number of bootstrap replications for computing the bootstrapped p-value for the test of no between-study variance. This integer is used for the methods P and LNP and its default value is 1000.

Author(s)

Robbie C.M. van Aert R.C.M.vanAert@tilburguniversity.edu

References

Fisher, R.A. (1950). Statistical methods for research workers (11th ed.). London: Oliver & Boyd.

van Aert, R.C.M., & van Assen, M.A.L.M. (2023). Correcting for publication bias in a meta-analysis with the p-uniform* method. Manuscript submitted for publication. Preprint: https://osf.io/preprints/bitss/zqjr9/

Examples

### Generate data for one-sample mean with mu = 0.2 and tau^2 = 0.01
set.seed(123)
ni <- rep(50, 25)
sdi <- rep(1, 25)
ui <- rnorm(25, mean = 0.2, sd = 0.1)
mi <- rnorm(25, mean = ui, sd = sdi/sqrt(ni))
tobs <- mi/(sdi/sqrt(ni))

### Apply p-uniform* method using sample means
puni_star(mi = mi, ni = ni, sdi = sdi, alpha = 0.05, side = "right", method = "ML")

### Apply p-uniform* method using t-values
puni_star(tobs = tobs, ni = ni, alpha = 0.05, side = "right", method = "ML")


RobbievanAert/puniform documentation built on Sept. 22, 2023, 2:53 a.m.