dpc10ster / RJafroc

Artificial Intelligence: Evaluating AI, optimizing AI
19 stars 8 forks source link

Seems that the treatment labels were wrongly inverted in the results of `StSignificanceTesting`? #58

Closed huangmozhilv closed 3 years ago

huangmozhilv commented 3 years ago

Here are my codes:

 library(RJafroc)
 library(flextable)
 library(gtsummary)
 library(readxl)
 library(dplyr)
 library(magrittr)

 frocCr_fp <- file.path('../out/Stage1_frocCr.xlsx')
 x <- DfReadDataFile(frocCr_fp, newExcelFileFormat = TRUE)

 ret_st <- StSignificanceTesting(x, FOM = "AFROC", method = "DBM")
 # ret_fom <- UtilFigureOfMerit(x, FOM = "AFROC") # same as ret_st$FOMs$foms

 ret_plt <- PlotEmpiricalOperatingCharacteristics(dataset = x, opChType = "AFROC")
 ret_plt$Plot

 # export tables to docx
 ReaderID_df <- readxl::read_excel(ID_book_fp, sheet='ReaderID')

 trt_rdr_foms <- ret_st$FOMs$foms
 trt_rdr_foms$trt <- row.names(trt_rdr_foms)
 trt_rdr_foms %<>% dplyr::select(trt, tidyr::everything())
 table1 <- flextable::flextable(trt_rdr_foms)

 ret_st$RRRC$FTests$p[1]
 ciAvgRdrEachTrt <- ret_st$RRRC$ciAvgRdrEachTrt
 ciAvgRdrEachTrt$trt <- row.names(ciAvgRdrEachTrt)
 ciAvgRdrEachTrt %<>% dplyr::select(trt, tidyr::everything())
 table2 <- flextable::flextable(ciAvgRdrEachTrt)

 ciDiffTrt <- ret_st$RRRC$ciDiffTrt
 ciDiffTrt$trt <- row.names(ciDiffTrt)
 ciDiffTrt %<>% dplyr::select(trt, tidyr::everything())
 table3 <- flextable::flextable(ciDiffTrt)

The output tables (1-3) are as below: image

My question: In the ModalityID variable, I assigned treatment A to be 0 and treatement B to be 1.

  1. In table 1, there are half cells with an value of 0.50000000. We think that this is because at this moment we only have the results of either of the two treatment for each reader. We believe that 0.5 should be those ReaderID-ModalityID pairs with missing values. However, the results in table 1 are totally inverted. For example, the data for rdr0-trt0 is missing, however, it is the AUC for rdr0-trt1 is 0.5.
  2. In table 3, it shows that trt1-trt0=0.065662269, which is the inverse number of trt1-trt0 in table 2.

Therefore, my question is: Are the trt1 and trt0 in table 1 and table 2 wrongly inverted?

Looking forward to your reply soon. Thank you very much.

dpc10ster commented 3 years ago
  1. Please confirm that you are using the master version of RJafroc, not the CRAN version.
  2. Regarding your point #2, from your Table 2, I get trt1-trt0 = -0.06565, which is the same as in Table 3.
  3. I did not quite understand your point #2; I do know that missing values are not replace with 0.5. Without your data file I cannot address this issue further.
dpc10ster commented 3 years ago

Chances are you have some readers who provide "empty" datasets, i.e., they do not mark any image; this is discussed in detail in my book; the reader gets credit for not generating any false positives but is penalized for not marking any lesions. The AFROC consists of two points, one at the origin and one at (1,1) leading to AUC = 0.5. It is not like "missing data" in statistics - there is a good reason for expecting AUC = 0.5.

huangmozhilv commented 3 years ago

Thank you so much for the explaination.

dpc10ster commented 3 years ago

You are welcome!

On Nov 18, 2020, at 1:51 AM, ccHuang notifications@github.com wrote:

Thank you so much for the explaination.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/dpc10ster/RJafroc/issues/58#issuecomment-729472949, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH4NJRDVM2EMTDIZ6I4HIZLSQNVF5ANCNFSM4TYVPASA.

dpc10ster commented 3 years ago

I set auto-renew off

Begin forwarded message:

From: "Register.com" support@Register.com Subject: Reminder: Your services are going to renew Date: November 22, 2020 at 2:03:51 AM EST To: dpc10ster@gmail.com Reply-To: "Register.com" no-reply@Register.com

http://cclinks.register.com/?e=QyyNZV57GS+n5M4EvP4Moc8NYu8GCLv+BS0UZ+sqB+pdIB7H/ft9XHQ+R6SsgXPeEFJaMesdtIASzbjsoyFJ9OHtK9uR27bq
Recurring Billing Reminder

Hi Dev,

We wanted to let you know that Auto Renew is currently enabled in your account for the services listed below. These services are set to renew using the credit card information currently on file.

Your account will be charged within thirty (30) days prior to its expiration date, for the term length you have previously chosen.

Account Number: 36199396 Account Holder: Dev Chakraborty

Service Description QTY TERM (Exp. Date) Hosting Essential for: 0001ej5.rcomhost.com http://0001ej5.rcomhost.com/ 1 1 year(s) ( 2021-02-05 ) Register.com http://register.com/ annual bundle 1 1 year(s) ( 2021-02-05 )

Important considerations right now: Your service may be renewed for a shorter term than the term for which you originally purchased your service(s). You will be charged the current price for each service. If you prefer to renew your service or services earlier than the expiration date or extend your renewal term, you can do so by logging into your account  http://cclinks.register.com/?e=QyyNZV57GS+n5M4EvP4Moc8NYu8GCLv+BS0UZ+sqB+pdIB7H/ft9XHQ+R6SsgXPeEFJaMesdtIASzbjsoyFJ9Kkm7J+YewR3X0Z6ZZfKChIgAtj24VSONcTZ5K11d7VW/yF2Se+rWqoWmGYiaY/cLg==and selecting the number of years for which you would like to renew. Please take a moment to make sure your billing and contact information  http://cclinks.register.com/?e=QyyNZV57GS+n5M4EvP4Moc8NYu8GCLv+BS0UZ+sqB+oRe1EeP8tesnQ+R6SsgXPeEFJaMesdtIASzbjsoyFJ9Kkm7J+YewR3i1tsRnym89uvoV66MlEMQw==is up-to-date to avoid any risk of a loss or lapse in your service.

PLEASE NOTE: If you have a free domain with your annual Web Hosting package and you place or have placed either of these services on Auto Renew, the domain will not renew for free when these services automatically renew.

To manage your Auto Renew option, please login to Account Manager http://cclinks.register.com/?e=QyyNZV57GS+n5M4EvP4Moc8NYu8GCLv+BS0UZ+sqB+oRe1EeP8tesnQ+R6SsgXPeEFJaMesdtIASzbjsoyFJ9Kkm7J+YewR3i1tsRnym89uvoV66MlEMQw== and click on the Renewal Center tab.

If you have any questions or need assistance, please give us a call or get online support.

Best Regards, Register.com http://register.com/ Customer Support
Need Assistance?

Call: 1-877-731-4442

http://cclinks.register.com/?e=QyyNZV57GS+n5M4EvP4Moc8NYu8GCLv+BS0UZ+sqB+oRe1EeP8tesnQ+R6SsgXPe9PE02hV8FHIRJRe6E6w5wYeVTtFoGloialxRO3erJek=
Hours: 7:00 a.m. - Midnight ET, 7 days a week

;

Please do not reply to this email. Replying to this email will not secure your services. Your services are subject to the terms and conditions set forth in our Service Agreement http://cclinks.register.com/?e=QyyNZV57GS+n5M4EvP4Moc8NYu8GCLv+BS0UZ+sqB+rQzJFkAz4AU3Q+R6SsgXPePjd1BpOZ7hnGSNVImDLxpANHZOqdD/oe, which you accepted at the time of purchase. Please note, in accordance with our Privacy Policy http://cclinks.register.com/?e=QyyNZV57GS+n5M4EvP4Moc8NYu8GCLv+BS0UZ+sqB+rQzJFkAz4AU3Q+R6SsgXPeUNYb8uus3glnW32HwJVJwMJHazZ5Yk3MjGkX2/S1uuWRghnugKXDQvzkDswq0WTeJYBJWctmPaI=, we will continue to send you notices and other important information affecting your account or services in order to fulfill our obligations to you.

©2020 by Register.com http://register.com/, LLC. All Rights Reserved. 5335 Gate Parkway | Jacksonville, FL 32256 Register.com http://register.com/, LLC® is a Web.com http://web.com/ Group, Inc. company.

Register.com http://register.com/, LLC® and Web.com® are registered trademarks of Web.com http://web.com/ Group, Inc. All other registered trademarks herein are the property of their respective owners.