Open marshhar opened 17 hours ago
I've done a bit of digging and this is the best I've come up with so far.
The error occurs in the doAUCmrmcCov function. Specifically, in the lines of code below, all values in both numer1234 and denom1234 are set to 0:
numer1234 <- colSums(perReaderPair.1[index.TF, c("numer1", "numer2", "numer3", "numer4")])
denom1234 <- colSums(perReaderPair.1[index.TF, c("denom1", "denom2", "denom3", "denom4")])
Later, the former is divided by the latter:
m.biased <- numer/denom
Which results in NaN for the first four values of m.biased. This eventually propagates to covAUC, also set to NaN.
covAUC <- sum(m.coeff * m)
This is later used in a conditional statement:
if (covAUC < 0)
Which throws the exception.
I'm afraid I am not familiar enough with this field to know what is supposed to be occurring. Should the first 4 entries of m.biased be 0 instead of NaN? Any help would be greatly appreciated!
Hi, I'm interested in using the iMRMC R package to analyze data for a non-inferiority trial I'm running. As a first step, I have been trying to replicate the analysis here: https://github.com/DIDSR/iMRMC/wiki/Non-inferiority-by-iMRMC.
However, when I execute this line of code:
I get this error: Error in if (covAUC < 0) { : missing value where TRUE/FALSE needed
I also tried my own dataset and got the same exception. Do you have any thoughts on what I could be doing wrong? Apologies if this answer is obvious, but I'm new to R.