moderate | R Documentation |
This is a wrapper to perform meta3 moderations with. The original data file must be in the environment.
moderate( model, ..., moderators = NULL, binary_intercept = 0, continuous_intercept = NULL, remove_empty_slopes = T, call_only = FALSE )
model |
A meta3 model. The original data file must be available in the environment, with the same name. |
... |
moderators, entered as objects |
moderators |
a character vector. A vector of moderator names may be supplied. |
binary_intercept |
a numeric. Constrain the intercept for matricies with binary elements |
continuous_intercept |
a numeric. Constrain the intercept for matricies with continuous elements |
remove_empty_slopes |
a bool. If true, removes empty columns from matricies. |
call_only |
If TRUE, returns the call passed to meta3_ninja |
moderate simplifies moderation analyses by taking the call from a meta3, and then using it to generate subsequent moderation models. A few rules are used to do this. 1. If a continuous variable is used a predictor, then an intercept is recorded 2. If binary variables are included, then intercepts are forced to be zero, these binary variables become the intercepts.
a meta_ninja \(until I rename it\)
library(metaSEM); library(msemtools) model0 = meta3(y = drink_yi, v = drink_vi, cluster = study_id, dat = conigrave20) summary(model0) m_moderated = model0 %>% moderate(Gender, Age) format_nicely(m_moderated, transform = metafor::transf.ilogit) plot(m_moderated)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.