Metafor 更新的自由度
Metafor updated degrees of freedom
编辑:更改代码以包含 test = "t"
我希望更好地了解 Metafor 2.5-101 的更新开发版本将如何帮助我调整多级模型中的自由度以提供一些针对 1 类错误的保护。
我对此的理解来自 Nakagawa 预印本“生态和进化荟萃分析中的出版偏见测试方法”https://ecoevorxiv.org/k7pmz/ 及其“Supplemental_Impleentation_Example.Rmd”文件,以及他们的行133-142:
Before moving on to some useful corrections, users should be aware that the most up-to-date version of metafor
(version 2.5-101) does now provide users with some protection against Type I errors. Instead of using the number of effect sizes in the calculation of the degrees of freedom we can instead make use of the total numbers of papers instead. We show in our simulations that a "papers-1" degrees of freedom can be fairly good. This can be implemented as follows after installing the development version of metafor
(see "R Packages Required" above):
mod_multilevel_pdf = rma.mv(yi = yi, V = vi, mods = ~1,
random=list(~1|study_id,~1|obs),
data=data, test="t", dfs = "contain")
summary(mod_multilevel_pdf)
We can see here that the df for the model has changes from 149 to 29, and the p-value has been adjusted accordingly.
所以我的理解是模型现在将 df 显示为 29(原始论文数 (30) -1,而不是论文数 x 效应数(30 篇论文,每篇论文有 5 个效应(150) -1)
将此应用到我的代码中,我有 n=18 篇论文,总共有 n=24 种效果,我希望使用上面的代码会将我的 df 调整为 17(原始论文数 (18) - 1), 但是我仍然有 df 为 23 (效果总数 (24) -1).
使用df代码输出:
mod_multilevel_pdf = rma.mv(yi = yi, V = vi, mods = ~1,
random=list(~1|study_id,~1|es_id),
data=dat, test="t", dfs = "contain")
summary(mod_multilevel_pdf)
是:
Multivariate Meta-Analysis Model (k = 24; method: REML)
logLik Deviance AIC BIC AICc
-30.2270 60.4540 66.4540 69.8604 67.7171
Variance Components:
estim sqrt nlvls fixed factor
sigma^2.1 0.6783 0.8236 18 no study_id
sigma^2.2 0.1416 0.3763 24 no es_id
Test for Heterogeneity:
Q(df = 23) = 167.2145, p-val < .0001
Model Results:
estimate se tval df pval ci.lb ci.ub
-0.3508 0.2219 -1.5809 17 0.1323 -0.8190 0.1174
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
完全被这个难住了!任何帮助将不胜感激。
您既没有 df=17 也没有 df=23,因为您没有指定要进行 t 检验。使用 test="t", dfs = "contain"
,您将获得 df=17 的预期 t 检验。
编辑:更改代码以包含 test = "t"
我希望更好地了解 Metafor 2.5-101 的更新开发版本将如何帮助我调整多级模型中的自由度以提供一些针对 1 类错误的保护。
我对此的理解来自 Nakagawa 预印本“生态和进化荟萃分析中的出版偏见测试方法”https://ecoevorxiv.org/k7pmz/ 及其“Supplemental_Impleentation_Example.Rmd”文件,以及他们的行133-142:
Before moving on to some useful corrections, users should be aware that the most up-to-date version of
metafor
(version 2.5-101) does now provide users with some protection against Type I errors. Instead of using the number of effect sizes in the calculation of the degrees of freedom we can instead make use of the total numbers of papers instead. We show in our simulations that a "papers-1" degrees of freedom can be fairly good. This can be implemented as follows after installing the development version ofmetafor
(see "R Packages Required" above):
mod_multilevel_pdf = rma.mv(yi = yi, V = vi, mods = ~1,
random=list(~1|study_id,~1|obs),
data=data, test="t", dfs = "contain")
summary(mod_multilevel_pdf)
We can see here that the df for the model has changes from 149 to 29, and the p-value has been adjusted accordingly.
所以我的理解是模型现在将 df 显示为 29(原始论文数 (30) -1,而不是论文数 x 效应数(30 篇论文,每篇论文有 5 个效应(150) -1)
将此应用到我的代码中,我有 n=18 篇论文,总共有 n=24 种效果,我希望使用上面的代码会将我的 df 调整为 17(原始论文数 (18) - 1), 但是我仍然有 df 为 23 (效果总数 (24) -1).
使用df代码输出:
mod_multilevel_pdf = rma.mv(yi = yi, V = vi, mods = ~1,
random=list(~1|study_id,~1|es_id),
data=dat, test="t", dfs = "contain")
summary(mod_multilevel_pdf)
是:
Multivariate Meta-Analysis Model (k = 24; method: REML)
logLik Deviance AIC BIC AICc
-30.2270 60.4540 66.4540 69.8604 67.7171
Variance Components:
estim sqrt nlvls fixed factor
sigma^2.1 0.6783 0.8236 18 no study_id
sigma^2.2 0.1416 0.3763 24 no es_id
Test for Heterogeneity:
Q(df = 23) = 167.2145, p-val < .0001
Model Results:
estimate se tval df pval ci.lb ci.ub
-0.3508 0.2219 -1.5809 17 0.1323 -0.8190 0.1174
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
完全被这个难住了!任何帮助将不胜感激。
您既没有 df=17 也没有 df=23,因为您没有指定要进行 t 检验。使用 test="t", dfs = "contain"
,您将获得 df=17 的预期 t 检验。