Question on calculating power for a prediction based study I've calculated required power for a study in the past but I've come upon a scenario that I can't figure out quite how to do it. Pretty much I have a procedure that results in a particular complication 15% of the time. My study uses an imaging intervention on all study participants that we believe can predict the occurance of that complication >= 50% of the time. How would I go about calculating the required power/patients needed for a study like this?
Thank you.
 A: If I understood correctly you are not worried about false positives. In that case the patients that do not have the complication are not of interest to you. You want to design the study to claim a certain degree of sensitivity.
There may be a way to calculate this directly, but since no one has answered you yet I will show my approach. I calculated the p-values for a one sided proportion test using the R prop.test() function and null hypothesis that % correct <0.5. This approach ignores all the patients who did not have complications. It gives the number of patients with complications that you will need.
This was done for samples sizes in the sequence of 10 to 100 by 1, and for % correct from .01 to 1 by .01. Then from these results I found the minimum % correct that yielded p<0.05 for each sample size.
The upper chart shows the relationship between "significant" % corrects vs sample size. While the lower shows power functions for a few example sample sizes. For the latter, the horizontal line corresponds to p=.05. 
If n=10 then the minimum observed % correct that will allow you to "reject" (at p<0.05) the hypothesis that your method is will detect less than half the patients with complications is 76.1%. Even for n=100 (remember this is 100 patients with complications), you will need to observe at least a 58.3% success rate to claim "significance".
If you want to calculate the total number of patients to enroll you need to multiply the sample sizes by 1/0.15 which is ~7.
I am fairly confident about this approach but not 100%, so hopefully someone will check it.

R code:
n<-seq(10,100,by=1) # sample sizes to check
perc.correct<-seq(.001,1,by=.001) # observed percent correct to check

alpha<-0.05 # "Significance" Cutoff

out=matrix(nrow=length(n)*length(perc.correct),ncol=3)
cnt=1
for(i in n){
  for(j in perc.correct){
    p<-prop.test(j*i,i, p=.5, alternative="g", correct=F)$p.value
    out[cnt,]<-cbind(i,100*j,p)
    cnt<-cnt+1
  }
}


# get lowest % correct that yielded p<0.05 for each sample size
out2=matrix(nrow=length(n),ncol=2)
cnt<-1
for(n2 in n){
  min.perc<-head(out[which(out[,1]==n2 & out[,3]<alpha),2],1)
  out2[cnt,]<-cbind(n2,min.perc)
  cnt<-cnt+1
}


# plots
layout(matrix(c(1,1,2,3,4,5), ncol=2, nrow=3, byrow=T))
plot(out2, xlab="Sample Size", ylab="% Correct",
     main=c("% Correct to Reject Hypothesis Success <50%",paste("alpha=",alpha))
)

for(n2 in c(10,30,60,100)){
  min.perc<-head(out[which(out[,1]==n2 & out[,3]<alpha),2],1)
  plot(out[which(out[,1]==n2),2],out[which(out[,1]==n2),3], 
       xlab="% Correct", ylab="P-Value", 
       main=c(paste("n=",n2),paste("Min % Correct for p<", alpha,"=",min.perc))
  )
  abline(h=alpha)
}

Edit:
Here is a different perspective. In this case we take the theory of % correct prediction of complications >50% as the null hypothesis. So using the significance testing logic we would choose to study the imaging technique more if it is not significant, but not use it if the result is significant. Here we are attempting to disprove the research hypothesis rather than the opposite as was done above (although the original way using reverse logic is the common approach for some strange reason).

R code 2 (lines with minor changes marked with "#*" at the end):
n<-seq(10,100,by=1) # sample sizes to check
perc.correct<-seq(.001,1,by=.001) # observed percent correct to check

alpha<-0.05 # "Significance" Cutoff

out=matrix(nrow=length(n)*length(perc.correct),ncol=3)
cnt=1
for(i in n){
  for(j in perc.correct){
    p<-prop.test(j*i,i, p=.5, alternative="l", correct=F)$p.value #*
    out[cnt,]<-cbind(i,100*j,p)
    cnt<-cnt+1
  }
}


# get highest % correct that yielded p<0.05 for each sample size
out2=matrix(nrow=length(n),ncol=2)
cnt<-1
for(n2 in n){
  max.perc<-tail(out[which(out[,1]==n2 & out[,3]<alpha),2],1) #*
  out2[cnt,]<-cbind(n2,max.perc) #*
  cnt<-cnt+1
}


# plots
layout(matrix(c(1,1,2,3,4,5), ncol=2, nrow=3, byrow=T))
plot(out2, xlab="Sample Size", ylab="% Correct",
     main=c("% Correct to Reject Hypothesis Success >50%",paste("alpha=",alpha))
)

for(n2 in c(10,30,60,100)){
  max.perc<-tail(out[which(out[,1]==n2 & out[,3]<alpha),2],1) #*
  plot(out[which(out[,1]==n2),2],out[which(out[,1]==n2),3], 
       xlab="% Correct", ylab="P-Value", 
       main=c(paste("n=",n2),paste("Max % Correct for p<", alpha,"=",max.perc)) #*
  )
  abline(h=alpha)
}

