wviechtb / metafor
Showing 1 of 1 files from the diff.
Newly tracked file
R/rma.uni.r changed.

@@ -1043,12 +1043,8 @@
 1043 1043 ` if (method == "HS") {` 1044 1044 ` tau2 <- ifelse(tau2.fix, tau2.val, (RSS - k) / sum(wi))` 1045 1045 ` } else {` 1046 + ` ### "HSk"` 1046 1047 ` tau2 <- ifelse(tau2.fix, tau2.val, (k/(k-p)*RSS - k) / sum(wi))` 1047 - ` ### HSk = (RSS - (k-p)) / sum(wi) * k/(k-p)` 1048 - ` #trP <- sum(wi) * (k-p) / k` 1049 - ` #tau2 <- ifelse(tau2.fix, tau2.val, k/(k-p) * (RSS - (k-p)) / trP)` 1050 - ` #tau2 <- ifelse(tau2.fix, tau2.val, (RSS - (k-p)) / trP)` 1051 - ` #tau2 <- ifelse(tau2.fix, tau2.val, k/(k-p) * (RSS - (k-p)) / sum(wi))` 1052 1048 ` }` 1053 1049 1054 1050 ` }`
@@ -1477,7 +1473,6 @@
 1477 1473 ` se.tau2 <- sqrt(1/sum(wi)^2 * (2*(k-p) + 4*max(tau2,0)*.tr(P) + 2*max(tau2,0)^2*sum(P*P))) ### note: wi = 1/vi` 1478 1474 ` if (method == "HSk")` 1479 1475 ` se.tau2 <- k/(k-p) * sqrt(1/sum(wi)^2 * (2*(k-p) + 4*max(tau2,0)*.tr(P) + 2*max(tau2,0)^2*sum(P*P)))` 1480 - ` #se.tau2 <- sqrt(1/trP^2 * (2*(k-p) + 4*max(tau2,0)*.tr(P) + 2*max(tau2,0)^2*sum(P*P))) # trP <- sum(wi) * (k-p) / k` 1481 1476 ` if (method == "HE")` 1482 1477 ` se.tau2 <- sqrt(1/(k-p)^2 * (2*sum(PV*t(PV)) + 4*max(tau2,0)*trPV + 2*max(tau2,0)^2*(k-p)))` 1483 1478 ` if (method == "DL" || method == "DLIT")`
Files Coverage
R 67.97%
Project Totals (179 files) 67.97%
Untitled