0
$\begingroup$

I'm looking to replicate a power analysis for binary data using an MRMC analysis (details found here). The data looks like this, where Score is a binary variable.

ReaderID     CaseID  Modality Score
1       truth Actual1001     truth     1
316   Reader1 Actual1016 modalityA     1
750   Reader2 Actual1150 modalityA     1
1005  Reader3 Actual1105 modalityA     1
1313  Reader1 Actual1113 modalityB     1
1577  Reader2 Actual1077 modalityB     1
1896  Reader3 Actual1096 modalityB     1

Essentially, the values used for the power calculation are:

SE.tot = .0377381
dfBDG = 2.3989
eff.size = .28
t.stat = eff.size/SE.tot = 7.4196
lambda = t.stat^2 = 55.04989
cutoff = qf(.95, 1, dfBDG) = 13.57782

And it's calculated with a noncentral F distribution. Using the relationship here I am trying to replicate the results from the Java applet on the Github page linked above.

Per the Java applet, power with these parameters should be .9. However when I try coding it as follows in R, I get .96.

Changing parameters also leads to different results, so I'm not exactly sure what small thing I'm messing up with this. Any help is appreciated!

F.vals = numeric(50)
d1 = 1
d2 = dfBDG - 1

for (i in 1:50){
  j = i - 1
  sfactor = exp(-lambda/2)*((lambda/2)^j)/factorial(j)
  F.vals[j] = sfactor*pbeta((cutoff*d1/(cutoff*d1+d2)), 
d1/2 + j, d2/2)
}
power = 1 - sum(F.vals)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.