analyses:gleser2009
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
analyses:gleser2009 [2022/08/03 11:17] – Wolfgang Viechtbauer | analyses:gleser2009 [2024/06/09 16:19] (current) – Wolfgang Viechtbauer | ||
---|---|---|---|
Line 79: | Line 79: | ||
Now the model described in equation (19.5) can be fitted with: | Now the model described in equation (19.5) can be fitted with: | ||
<code rsplus> | <code rsplus> | ||
- | res <- rma.mv(yi, V, mods = ~ factor(trt) | + | res <- rma.mv(yi, V, mods = ~ 0 + factor(trt), |
res | res | ||
</ | </ | ||
Line 127: | Line 127: | ||
V <- bldiag(lapply(split(dat, | V <- bldiag(lapply(split(dat, | ||
- | res <- rma.mv(yi, V, mods = ~ factor(trt) | + | res <- rma.mv(yi, V, mods = ~ 0 + factor(trt), |
res | res | ||
</ | </ | ||
Line 165: | Line 165: | ||
V <- bldiag(lapply(split(dat, | V <- bldiag(lapply(split(dat, | ||
- | res <- rma.mv(yi, V, mods = ~ factor(trt) | + | res <- rma.mv(yi, V, mods = ~ 0 + factor(trt), |
res | res | ||
</ | </ | ||
Line 202: | Line 202: | ||
V <- bldiag(lapply(split(dat, | V <- bldiag(lapply(split(dat, | ||
- | res <- rma.mv(yi, V, mods = ~ factor(trt) | + | res <- rma.mv(yi, V, mods = ~ 0 + factor(trt), |
res | res | ||
</ | </ | ||
Line 283: | Line 283: | ||
The analysis can now be carried out with: | The analysis can now be carried out with: | ||
<code rsplus> | <code rsplus> | ||
- | res <- rma.mv(yi, V, mods = ~ factor(trt) | + | res <- rma.mv(yi, V, mods = ~ 0 + factor(trt), |
print(res, digits=3) | print(res, digits=3) | ||
</ | </ | ||
Line 336: | Line 336: | ||
dat$yi <- round(with(dat, | dat$yi <- round(with(dat, | ||
dat$vi <- round(with(dat, | dat$vi <- round(with(dat, | ||
- | dat$covi <- round(with(dat, | + | dat$covi <- round(with(dat, |
+ | | ||
+ | | ||
</ | </ | ||
The contents of the resulting dataset are: | The contents of the resulting dataset are: | ||
Line 359: | Line 361: | ||
The variance-covariance matrix for the entire dataset can be constructed with: | The variance-covariance matrix for the entire dataset can be constructed with: | ||
<code rsplus> | <code rsplus> | ||
- | V <- bldiag(lapply(split(dat, | + | V <- bldiag(lapply(split(dat, |
+ | | ||
V | V | ||
</ | </ | ||
Line 383: | Line 386: | ||
Finally, we can fit a model allowing for a different treatment effect depending on the outcome with: | Finally, we can fit a model allowing for a different treatment effect depending on the outcome with: | ||
<code rsplus> | <code rsplus> | ||
- | res <- rma.mv(yi, V, mods = ~ outcome | + | res <- rma.mv(yi, V, mods = ~ 0 + outcome, data=dat) |
print(res, digits=3) | print(res, digits=3) | ||
</ | </ |
analyses/gleser2009.txt · Last modified: 2024/06/09 16:19 by Wolfgang Viechtbauer