boot.fcor: Fisher-transformed Pearson's correlation: Bootstrap-based...

Description Usage Arguments Details Value References Examples

View source: R/boot.fcor.R

Description

boot.fcor returns the bootstrap-based tests of the residual heterogeneity in random- or mixed- effects model of Pearson's correlation coefficients transformed with Fisher's r-to-z transformation (z scores).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
boot.fcor(
  n,
  z,
  lambda = 0,
  model = "random",
  mods = NULL,
  nrep = 10^4,
  p_cut = 0.05,
  boot.include = FALSE,
  parallel = FALSE,
  cores = 4,
  verbose = FALSE
)

Arguments

n

A vector of sample sizes in each of the included studies.

z

A vector of Fisher-transformed Pearson's correlations.

lambda

Size of the magnitude to be tested in the alternative hypothesis of the heterogeneity magnitude test. Default to 0.

model

Choice of random- or mixed- effects models. Can only be set to "random", or "mixed".

mods

Optional argument to include moderators in the model. mods is NULL for random-effects model and a dataframe of moderators for mixed-effects model. A single moderator can be given as a vector specifying the values of the moderator. Multiple moderators are specified by giving a matrix with as many columns as there are moderator variables. See rma for more details.

nrep

Number of replications used in bootstrap simulations. Default to 10^4.

p_cut

Cutoff for p-value, which is the alpha level. Default to 0.05.

boot.include

If true, bootstrap simulation results are included in the output.

parallel

If true, parallel computing using 4 cores will be performed during bootstrapping stage. Otherwise, for loop is used.

cores

The number of cores used in the parallel computing. Default to 4.

verbose

If true, show the progress of bootstrapping.

Details

This function returns the test statistics as well as their p-value and significances using (1) Q-test and (2) Bootstrap-based Heterogeneity Test with Restricted Maximum Likelihood (REML).

The results of significances are classified as "sig" or "n.s" based on the cutoff p-value (i.e., alpha level). "sig" means that the between-study heterogeneity is significantly different from zero whereas "n.s" means the between-study heterogeneity is not significantly different from zero. The default alpha level is 0.05.

Value

A dataframe that contains the test statistics ('stat'), p-values ('p_value'), and significances of effect size heterogeneity ("Heterogeneity").

References

Zuckerman, M. (1994). Behavioral expressions and biosocial bases of sensation-seeking. New York, NY: Cambridge University Press.

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1-48. URL: http://www.jstatsoft.org/v36/i03/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# A meta-analysis of 13 studies studying the correlation
# between sensation-seeking scores and levels of monoamine oxidase (Zuckerman, 1994).

sensation <- boot.heterogeneity:::sensation

# n is a list of samples sizes
n <- sensation$n

# Pearson's correlation
r <- sensation$r

# Fisher's Transformation
z <- 1/2*log((1+r)/(1-r))

## Not run: 
#' boot.run <- boot.fcor(n, z, model = 'random', p_cut = 0.05)

## End(Not run)

boot.heterogeneity documentation built on Oct. 23, 2021, 9:08 a.m.