num_studies: num_studies

View source: R/mod_results.R

num_studiesR Documentation

num_studies

Description

Computes how many studies are in each level of categorical moderators of a rma.mv model object.

Usage

num_studies(data, mod, group)

Arguments

data

Raw data from object of class "orchard"

mod

Character string describing the moderator of interest.

group

A character string specifying the column name of the study ID grouping variable.

Value

Returns a table with the number of studies in each level of all parameters within a rma.mv or rma object.

Author(s)

Shinichi Nakagawa - s.nakagawa@unsw.edu.au

Daniel Noble - daniel.noble@anu.edu.au

Examples

## Not run: data(fish)
warm_dat <- fish
model <- metafor::rma.mv(yi = lnrr, V = lnrr_vi, random = list( ~1 | es_ID,~1 | group_ID), mods = ~experimental_design-1, method = "REML", test = "t", data = warm_dat, control=list(optimizer="optim", optmethod="Nelder-Mead"))
num_studies(model$data, experimental_design, group_ID)

## End(Not run)

daniel1noble/orchaRd documentation built on May 12, 2024, 7:46 a.m.