Skip to contents

This function filters rows of a dataset based on a priority rule for specific variables defined by the user.


filterPriorityRule(.data, ..., .study.indicator = "study")



A data.frame containing the calculated effect sizes, as created by the calculateEffectSizes function.


<dplyr_data_masking>. A number of prioritized filtering rules for variables. Should follow the form variable = c("prio1", "prio2", ...). To apply multiple priority filters, simply separate them using a comma. For each study, rows are then selected based on the specified hierarchy for a variable. The priorities are provided as a concatenated vector, representing the variable levels. The level to appear first in this vector has the highest priority, the second one the second-largest priority, and so on. If a study contains none of the variable levels specified in the function call, the study is omitted entirely.


character. Name of the variable in which the study IDs are stored.


filterPriorityRule returns the filtered data set as class data.frame. The filtered data set should then be ready for meta-analytic pooling, for example using metagen. Further filters can be applied using filterPoolingData.

See also


For more details see the Get Started vignette.


Mathias Harrer mathias.h.harrer@gmail.com, Paula Kuper paula.r.kuper@gmail.com, Pim Cuijpers p.cuijpers@vu.nl


if (FALSE) {
# Load data and calculate effect size
depressionPsyCtr %>%
  checkDataFormat() %>%
  checkConflicts() %>%
  calculateEffectSizes() -> data

# Filter using four priority rules
                   condition_arm1 = c("cbt", "pst"),
                   condition_arm2 = c("cau", "wl", "cbt"),
                   instrument = c("cesd", "phq-9", "scl", "hdrs"),
                   time = c("post", "fu")) -> res