Displaying 1 result from an estimated 1 matches for "phiu".
Did you mean:
phi
2008 Sep 26
0
Confidence interval for binomial variance
...rtion
if (p<0.25 | p>0.75 | x==0 | x==n) { #use proportion-based CI
pCI<- binWilson(n, x, conf.level=conf) #CI for proportion
vCI<- sort(c(pCI[1]*(1-pCI[1])/(n-1), pCI[2]*(1-pCI[2])/(n-1)))
} else { #use chi-square-based CI
phiL<- qchisq(0.025, n-1)/(n-1)
phiU<- qchisq(0.975, n-1)/(n-1)
#vest<- p*(1-p)/(n-1)) #variance estimate
vCI<- c(vest/phiU, vest/phiL) #chi-square-based
}
return (vCI)
}
Here is a test program to measure coverage:
#09.26.08 03.10 tbinomVarCI.r
#copyright 2008 by Robert A LaBudde, all rights reserved
#test...