Power with Fieller [General Statistics]
Dear all!
We recently encountered an unexpected behavior (at least I was not aware of it) with Fieller confidence intervals. It seems that the power for showing equivalence is not maximized at delta = 1 for rather large variances. Is there an error in the code or is this behavior well known?
best regards
martin
We recently encountered an unexpected behavior (at least I was not aware of it) with Fieller confidence intervals. It seems that the power for showing equivalence is not maximized at delta = 1 for rather large variances. Is there an error in the code or is this behavior well known?
best regards
martin
library(pairwiseCI)
set.seed(7750)
nsim <- 1E5
sd <- 0.25
res1 <- res2 <- res3 <- res4 <- matrix(NA,ncol=2,nrow=nsim)
n <- 10
for(i in 1:nsim){
a1 <- rnorm(n,1,sd=sd)
a2 <- rnorm(n,0.975,sd=sd)
a3 <- rnorm(n,1.025,sd=sd)
a4 <- rnorm(n,1.050,sd=sd)
b <- rnorm(n,1,sd=sd)
res1[i,] <- as.vector(Param.ratio(a1,b,conf.level=0.9,var.equal=F)$conf.int)
res2[i,] <- as.vector(Param.ratio(a2,b,conf.level=0.9,var.equal=F)$conf.int)
res3[i,] <- as.vector(Param.ratio(a3,b,conf.level=0.9,var.equal=F)$conf.int)
res4[i,] <- as.vector(Param.ratio(a4,b,conf.level=0.9,var.equal=F)$conf.int)
}
# delta=1: expected to have the largest power
mean(res1[,1]>0.8 & res1[,2]<1.25)
# delta=0.975
mean(res2[,1]>0.8 & res2[,2]<1.25)
# delta=1.025
mean(res3[,1]>0.8 & res3[,2]<1.25)
# delta=1.05
mean(res4[,1]>0.8 & res4[,2]<1.25)
Complete thread:
- Power with Fiellermartin 2012-11-15 17:29 [General Statistics]
- Power with Fieller Helmut 2012-11-16 01:28
- 'Expected' Power with Fieller d_labes 2012-11-16 09:03
- 'Expected' Power with Fieller Helmut 2012-11-16 13:54
- 'Expected' Power with Fieller Jack 2012-11-19 10:35
- 'Expected' Power with Fieller Helmut 2012-11-16 13:54