search for: highse

Displaying 1 result from an estimated 1 matches for "highse".

Did you mean: highs
2012 Jan 05
2
Bayesian estimate of prevalence with an imperfect test
....lancs.ac.uk/staff/diggle/prevalence_estimation.R/ (the folllowing code has been cut and pasted directly from the web resource - the only change I have made is to fill in my values for T, n, low/high se/sp and the alpha beta for the distributions) prevalence.bayes<-function(theta,T,n,lowse=0.5,highse=1.0, sea=1,seb=1,lowsp=0.5,highsp=1.0,spa=1,spb=1,ngrid=20,coverage=0.95) { ibeta<-function(x,a,b) { pbeta(x,a,b)*beta(a,b) } ntheta<-length(theta) bin.width<-(theta[ntheta]-theta[1])/(ntheta-1) theta<-theta[1]+bin.width*(0:(ntheta-1)) integrand<-array(0,...