REmrt: Random effects meta-tree

View source: R/REmrt_main.R

REmrtR Documentation

Random effects meta-tree

Description

A function to fit a random effects meta-tree

Usage

REmrt(
  formula,
  data,
  vi,
  c.pruning = 1,
  maxL = 5,
  minsplit = 6,
  cp = 1e-05,
  minbucket = 3,
  xval = 10,
  lookahead = FALSE,
  sss = FALSE,
  alpha.endcut = 0.02,
  a = 50,
  multi.start = TRUE,
  n.starts = 3,
  perm = NULL,
  ...
)

Arguments

formula

A formula, with a response variable (usually the effect size) and the potential moderator variables but no interaction terms.

data

A data frame of a meta-analytic data set, including the study effect sizes, sampling variance, and the potential moderators.

vi

sampling variance of the effect size.

c.pruning

A non-negative scalar.The pruning parameter to prune the initial tree by the "c*standard-error" rule.

maxL

the maximum number of splits

minsplit

the minimum number of studies in a parent node before splitting

cp

the stopping rule for the decrease of between-subgroups Q. Any split that does not decrease the between-subgroups Q is not attempted.

minbucket

the minimum number of the studies in a terminal node

xval

the number of folds to perform the cross-validation

lookahead

an argument indicating whether to apply the "look-ahead" strategy when fitting the tree

sss

boolean parameter indicating whether the SSS algorithm must be used.

alpha.endcut

parameter used in the splitting algorithm to avoid the endcut preference problem.

a

parameter used in the sss to determine the slope of the logistic function that replaces the indicator function.

multi.start

boolean indicating whether multiple starts must be used

n.starts

number of multiple starts

perm

the number of permuted data sets, if NULL then no permutation test is performed

...

Additional arguments to be passed.

Value

If (a) moderator effect(s) is(are) detected, the function will return a list including the following objects:

tree: A data frame that represents the tree, with the Q-between and the residual heterogeneity (tau^2) after each split.

n: The number of the studies in each subgroup

moderators: the names of identified moderators

Qb: The between-subgroups Q-statistic

tau2: The estimate of the residual heterogeneity

df: The degrees of freedom of the between-subgroups Q test

pval.Qb: The p-value of the between-subgroups Q test

g: The subgroup summary effect size, based on Hedges'g

se: The standard error of subgroup summary effect size

zval: The test statistic of the subgroup summary effect size

pval: The p-value of the test statistic of the subgroup summary effect size

ci.lb: The lower bound of the confidence interval

ci.ub: The upper bound of the confidence interval

call: The matched call

cptable: The cross-validation table

data: the data set subgrouped by the fitted tree

If no moderator effect is detected, the function will return a list including the following objects:

n: The total number of the studies

Q: The Q-statistics for the heterogeneity test

df: The degree of freedoms of the heterogeneity test

pval.Q: The p-value for the heterogeneity test

g: The summary effect size for all studies (i.e., the overall effect size)

se: The standard error of the summary effect size

zval: The test statistic of the summary effect size

pval: The p-value for the test statistic of the summary effect size

ci.lb: The lower bound of the confidence interval for the summary effect size

ci.ub: The upper bound of the confidence interval for the summary effect size

formula: The formula provided as input.

call: The matched call

initial.tree: The initial tree obtained before pruning.

See Also

summary.REmrt, plot.REmrt

Examples

#set.seed is required to obtain the same tree 
#due to the use of a probabilistic algorithm for pruning
set.seed(12345) 
data(dat.BCT2009)
library(Rcpp)
REtree <- REmrt(g ~ T1 + T2+ T4 +T25, vi = vi, data = dat.BCT2009, c.pruning = 0)
summary(REtree)
plot(REtree)

#You can obtain the non-pruned tree by calling the initial.tree output argument
REtree$initial.tree


metacart documentation built on June 8, 2025, 12:46 p.m.