View source: R/data-generation.R
| r_meta | R Documentation |
Generate meta-analytic correlated or correlated and hierarchical effects data with options to simulate selective outcome reporting
r_meta(
mean_smd,
tau,
omega,
m,
cor_mu,
cor_sd,
n_ES_sim,
censor_fun = NULL,
m_multiplier = 1,
id_start = 0L,
paste_ids = TRUE,
include_sel_prob = FALSE
)
mean_smd |
numeric value indicating the true mean effect size. |
tau |
numeric value characterizing between-study heterogeneity in effects. |
omega |
numeric value characterizing within-study heterogeneity in effects. |
m |
numeric value of studies in the simulated meta-analysis. |
cor_mu |
numeric value indicating the average correlation between outcomes. |
cor_sd |
numeric value indicating standard deviation of correlation between outcomes. |
n_ES_sim |
a function used to simulate the distribution of primary study sample sizes and the number of effect sizes per study. |
censor_fun |
a function used to censor effects. The
package provides functionals |
m_multiplier |
numeric value for a multiplier to buffer the number of studies generated. |
id_start |
integer indicating the starting value for study id. |
paste_ids |
logical with |
include_sel_prob |
logical with |
A data.frame containing the simulated
meta-analytic dataset.
example_dat <- r_meta(
mean_smd = 0,
tau = .1, omega = .01,
m = 50,
cor_mu = .4, cor_sd = 0.001,
censor_fun = step_fun(cut_vals = .025, weights = 0.4),
n_ES_sim = n_ES_param(40, 3)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.