Wider confidence intervals in forest plots of prevalence estimates
I am a new R user, running random effects models to obtain pooled prevalence estimates using metafor. The individual prevalence estimates were obtained separately (using SAS) through weighting to be population representative, and loaded into R from an excel spreadsheet along with corresponding standard errors.
I noticed that the confidence intervals for individual prevalence estimates in the forest plots are much narrower than the confidence intervals for the original weighted prevalence estimates obtained in SAS. This has been the case for my colleagues when running similar analyses of the same dataset using metafor.
Should these confidence intervals match the confidence intervals for the original prevalence estimates? What might be the reason for this difference in confidence interval width? I'm concerned about how this might be impacting pooled estimates and tests of heterogeneity.
I am providing sample code below:
###prevalence estimate for Change:####
# Dataset1 #
changedata1 <- subset(ES, Type == "change" & Site == "Data1")
changedata1$effect <- changedata1$Estimate
changedata1$se <- changedata1$SE
# Dataset2 #
changedata2 <- subset(ES, Type == "change" & Site == "Data2")
changedata2 $effect <- changedata2$Estimate
changedata2 $se <- changedata2$SE
# Dataset3 #
changedata3 <- subset(ES, Type == "change" & Site == "Data3")
changedata3$effect <- changedata3$Estimate
changedata3$se <- changedata3$SE
# combined data frames to reflect merge
change <- rbind(changedata1, changedata2, changedata3)
res <- rma(effect, se, data=change, method="DL", slab=paste(Site, unweighted_n, sep=", "))
sink(file="change.txt", type="output")
print("Change")
print(res)
sink()
pdf(file="Any Tic Disorder.pdf", width = 10, height = 8)
forest(res)
dev.off()
Comments
Post a Comment