背景
我正在进行一项荟萃分析,其中包括以前发布的数据。通常,用P值,最小显着差异(LSD)和其他统计数据报告处理之间的差异,但无法直接估算出差异。
在我使用的模型的上下文中,可以高估方差。
问题
这里是变换来的列表其中(萨维尔2003) ,我考虑,反馈理解; 下面,我假定α = 0.05所以1 - α / 2 = 0.975 和变量是正态分布的,除非另有说明:
问题:
给定的,Ñ,和治疗手段ˉ X 1和ˉ X 2小号Ë = ˉ X 1 - ˉ X 2
给定LSD (Rosenberg 2004),,n,b,其中b是块数,对于RCBD S E = L S D默认为 n = b
给定MSD(最小有效差)(Wang 2000),,α,df = 2 n - 2 S E = M S D
给定一个95%的置信区间(Saville 2003)(从均值到置信上限或下限测量),和n S E = C I
给定Tukey的HSD,,其中q是“学习范围统计”,S E = H S D
R函数封装以下等式:
示例数据:
data <- data.frame(Y=rep(1,5), stat=rep(1,5), n=rep(4,5), statname=c('SD', 'MSE', 'LSD', 'HSD', 'MSD')
使用示例:
transformstats(data)
该
transformstats
函数:transformstats <- function(data) { ## Transformation of stats to SE ## transform SD to SE if ("SD" %in% data$statname) { sdi <- which(data$statname == "SD") data$stat[sdi] <- data$stat[sdi] / sqrt(data$n[sdi]) data$statname[sdi] <- "SE" } ## transform MSE to SE if ("MSE" %in% data$statname) { msei <- which(data$statname == "MSE") data$stat[msei] <- sqrt (data$stat[msei]/data$n[msei]) data$statname[msei] <- "SE" } ## 95%CI measured from mean to upper or lower CI ## SE = CI/t if ("95%CI" %in% data$statname) { cii <- which(data$statname == '95%CI') data$stat[cii] <- data$stat[cii]/qt(0.975,data$n[cii]) data$statname[cii] <- "SE" } ## Fisher's Least Significant Difference (LSD) ## conservatively assume no within block replication if ("LSD" %in% data$statname) { lsdi <- which(data$statname == "LSD") data$stat[lsdi] <- data$stat[lsdi] / (qt(0.975,data$n[lsdi]) * sqrt( (2 * data$n[lsdi]))) data$statname[lsdi] <- "SE" } ## Tukey's Honestly Significant Difference (HSD), ## conservatively assuming 3 groups being tested so df =2 if ("HSD" %in% data$statname) { hsdi <- which(data$statname == "HSD" & data$n > 1) data$stat[hsdi] <- data$stat[hsdi] / (qtukey(0.975, data$n[lsdi], df = 2)) data$statname[hsdi] <- "SE" } ## MSD Minimum Squared Difference ## MSD = t_{\alpha/2, 2n-2}*SD*sqrt(2/n) ## SE = MSD*n/(t*sqrt(2)) if ("MSD" %in% data$statname) { msdi <- which(data$statname == "MSD") data$stat[msdi] <- data$stat[msdi] * data$n[msdi] / (qt(0.975,2*data$n[lsdi]-2)*sqrt(2)) data$statname[msdi] <- "SE" } if (FALSE %in% c('SE','none') %in% data$statname) { print(paste(trait, ': ERROR!!! data contains untransformed statistics')) } return(data) }
参考文献