A function to fit a random effects meta-tree
REmrt(
formula,
data,
vi,
c.pruning = 0,
maxL = 5,
minsplit = 6,
cp = 1e-05,
minbucket = 3,
xval = 10,
lookahead = TRUE,
sss = TRUE,
alpha.endcut = 0.02,
a = 50,
multi.start = TRUE,
n.starts = 3,
perm = 25,
seed = NULL,
...
)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.
A formula, with a response variable (usually the effect size) and the potential moderator variables but no interaction terms.
A data frame of a meta-analytic data set, including the study effect sizes, sampling variance, and the potential moderators.
sampling variance of the effect size.
A non-negative scalar.The pruning parameter to prune the initial tree by the "c*standard-error" rule.
the maximum number of splits
the minimum number of studies in a parent node before splitting
the stopping rule for the decrease of between-subgroups Q. Any split that does not decrease the between-subgroups Q is not attempted.
the minimum number of the studies in a terminal node
the number of folds to perform the cross-validation
an argument indicating whether to apply the "look-ahead" strategy when fitting the tree
boolean parameter indicating whether the SSS algorithm must be used.
parameter used in the splitting algorithm to avoid the endcut preference problem.
parameter used in the sss to determine the slope of the logistic function that replaces the indicator function.
boolean indicating whether multiple starts must be used
number of multiple starts
the number of permuted data sets, if NULL then no permutation test is performed.
Seed used to obtain replicable results. Default = NULL.
Additional arguments to be passed.
summary.REmrt, plot.REmrt
#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
Run the code above in your browser using DataLab