simData | R Documentation |
This function simulates aggregated data for a meta-analysis, introducing biased studies at different levels.
simData(
mu,
sigma,
n.total,
tau,
N,
mu.beta.1,
mu.beta.2,
mu.beta.3,
n.B.1,
n.B.2,
n.B.3
)
mu |
Scalar with the true pooled effect value. |
sigma |
Scalar with the true intra-study standard deviation. |
n.total |
A vector with the sample sizes of the studies. |
tau |
Scalar with the between-studies standard deviation. |
N |
Scalar with the total number of studies in the meta-analysis. |
mu.beta.1 |
Scalar with the mean bias of studies in the mild bias class. |
mu.beta.2 |
Scalar with the mean bias of studies in the large bias class. |
mu.beta.3 |
Scalar with the mean bias of studies in the extreme bias class. |
n.B.1 |
Scalar with the number of studies in the mild bias class. |
n.B.2 |
Scalar with the number of studies in the large bias class. |
n.B.3 |
Scalar with the number of studies in the extreme bias class. |
A dataframe with columns:
TE |
Observed study's effect. |
seTE |
Standard error of the study's effect. |
theta |
True study's effect. |
n.total |
Sample size of the study. |
B.flag |
Bias category: "No B", "Mild B", "Large B", "Extreme B". |
set.seed(123)
simData(mu = 0, sigma = 1, n.total = rep(100, 10), tau = 0.5, N = 10,
mu.beta.1 = 0.2, mu.beta.2 = 0.5, mu.beta.3 = 1,
n.B.1 = 2, n.B.2 = 2, n.B.3 = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.