dpc10ster / RJafroc

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

Splitplot #30

Closed jsqcai closed 5 years ago

jsqcai commented 5 years ago

This SAS program 'StSignificanceTesting.sas' is for Obuchowski-Rockette model, and it works for both factorial design and case-nested-within-reader split-plot design. Covariances are estimated by bootstrapping.

dpc10ster commented 5 years ago

Jason,

This is fantastic! I will take a careful look at it soon and get back to you. Do you know any way of running SAS on a server, or must one have a license?

Can you use the jackknife also, as that way we should get an exact match between the two methods (SAS vs. RJafroc)?

As you can probably tell, I have been busy with the code that reads the Excel sheet data file; the original code, written by Xuetong Zhai (an excellent student I had the pleasure of working with) was difficult for me to maintain/extend. At this point I am still checking the read function and debugging.

I am almost ready now to address the split-plot design. From what you told me earlier, I need to estimate Cov1 for each reader interpreting his own dataset, average over all readers, and also set Cov2 = Cov3 = 0. Then the formulae for OR testing apply. Is my understanding correct?

You will see in the code I have pushed that the Excel file format has been extended to include 3 extra columns in the Truth sheet, one containing the readerIDs, e.g., “1”, “2”, “3”, “4”, one containing the modalityIDs, e.g., “1”, “2”, and the last describing the paradigm, e.g., ROC, crossed or ROC, split-plot. This set up should allow more general study designs to be efficiently coded in the file and to minimize data entry errors. The location of these files is (relative to the root directory) in inst/extdata. For example, inst/extdata/SplitPlotData.xlsx.

Dev

On Aug 21, 2019, at 12:50, Jason (Qiang) Cai notifications@github.com wrote:

This SAS program 'StSignificanceTesting.sas' is for Obuchowski-Rockette model, and it works for both factorial design and case-nested-within-reader split-plot design. Covariances are estimated by bootstrapping.

You can view, comment on, or merge this pull request online at:

https://github.com/dpc10ster/RJafroc/pull/30 https://github.com/dpc10ster/RJafroc/pull/30 Commit Summary

Add files via upload Add files via upload File Changes

A SAS/AFROC.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-0 (2150) A SAS/AFROC1.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-1 (2150) A SAS/DataFile.xls https://github.com/dpc10ster/RJafroc/pull/30/files#diff-2 (0) A SAS/HrAuc.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-3 (2150) A SAS/HrSe.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-4 (2150) A SAS/HrSp.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-5 (2150) A SAS/MaxLLF.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-6 (2150) A SAS/MaxNLF.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-7 (2150) A SAS/MaxNLFAllCases.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-8 (2150) A SAS/ROC.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-9 (2150) A SAS/Se@4.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-10 (0) A SAS/Sp@4.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-11 (0) A SAS/SplitPlotData.xlsx https://github.com/dpc10ster/RJafroc/pull/30/files#diff-12 (0) A SAS/StSignificanceTesting.sas https://github.com/dpc10ster/RJafroc/pull/30/files#diff-13 (0) A SAS/wAFROC.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-14 (0) A SAS/wAFROC1.html https://github.com/dpc10ster/RJafroc/pull/30/files#diff-15 (0) Patch Links:

https://github.com/dpc10ster/RJafroc/pull/30.patch https://github.com/dpc10ster/RJafroc/pull/30.patch https://github.com/dpc10ster/RJafroc/pull/30.diff https://github.com/dpc10ster/RJafroc/pull/30.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dpc10ster/RJafroc/pull/30?email_source=notifications&email_token=AH4NJRBKFWBKOS5SRF7V753QFVW4RA5CNFSM4IOJ323KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGSFEXA, or mute the thread https://github.com/notifications/unsubscribe-auth/AH4NJRBY3I2ELXUQX7AHLALQFVW4RANCNFSM4IOJ323A.

dpc10ster commented 5 years ago

Jason, you got it! Let me wait for Peter @pwep to get back from his vacation for his comments. Since your code is in SAS, we might want to have a separate branch off my splitplot branch, possibly SAS.

jsqcai commented 5 years ago

Dr. Chakraborty,

Basically, a license is required to run SAS programs. But I've also heard of the SAS university edition which seems license-free. https://www.sas.com/en_us/software/university-edition.html I will extend the covariance estimation method to jackknife also. And you are correct on the estimation of the covariances of the case-nested-within-reader split-plot design. I will check if the SAS program works on the new Excel format. Will let you know.

Jason

dpc10ster commented 5 years ago

Hi Jason,

Thanks for the information about SAS. I used SAS (novice level) a long time ago, while I was with universities. But I no longer am employed by them. I did look up their pricing - it does not make sense for me to get a license! But we could use the collaboration to provide users with two ways of analyzing their data: R based or SAS based (for those users having a SAS license). If the SAS component grows, it could be its own package distributed by other mechanisms. I understand it is common to call R from SAS, but not the other way around (brief google searching).

I think I know where to put your files, at least temporarily. The inst directory can contain almost anything. So a sub-directory inst/sas could contain all of your testing results. That way the project will pass the automatic tests (Travis) that it is currently failing on your branch. So, assuming you have forked the current version, you can put your files in a directory inst/sas and check it from RStudio (R CMD check). [This part is very R specific and I can guide you through it]. If it passes your local tests, you can push it to your origin (which will trigger a Travis build) and then issue a pull request from GitHub Desktop and I can merge your additional files into the current splitPlot branch.

Thanks for confirming my understanding of your explanation of the paper I sent you. Also, thanks for accepting my suggestion about using the jackknife.

I am getting close to my travel deadline, so I will need to back-off working on this project for a while.

Best wishes,

Dev

On Aug 21, 2019, at 21:55, Jason (Qiang) Cai notifications@github.com wrote:

Dr. Chakraborty,

Basically, a license is required to run SAS programs. But I've also heard of the SAS university edition which seems license-free. https://www.sas.com/en_us/software/university-edition.html I will extend the covariance estimation method to jackknife also. And you are correct on the estimation of the covariances of the case-nested-within-reader split-plot design. I will check if the SAS program works on the new Excel format. Will let you know.

Jason

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dpc10ster/RJafroc/pull/30?email_source=notifications&email_token=AH4NJRBXW54PWX67SIA7VE3QFXWYZA5CNFSM4IOJ323KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD43T7CI#issuecomment-523714441, or mute the thread https://github.com/notifications/unsubscribe-auth/AH4NJRAHDF25OS6SZ5BKYODQFXWYZANCNFSM4IOJ323A .

jsqcai commented 5 years ago

Enjoy your travel!

codecov[bot] commented 5 years ago

Codecov Report

Merging #30 into splitplot will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           splitplot      #30   +/-   ##
==========================================
  Coverage      58.31%   58.31%           
==========================================
  Files             58       58           
  Lines           7671     7671           
==========================================
  Hits            4473     4473           
  Misses          3198     3198

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 948de57...7bd4cff. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #30 into splitplot will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           splitplot      #30   +/-   ##
==========================================
  Coverage      58.31%   58.31%           
==========================================
  Files             58       58           
  Lines           7671     7671           
==========================================
  Hits            4473     4473           
  Misses          3198     3198
Impacted Files Coverage Δ
R/DfReadDataFile.R 40.94% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 948de57...7bd4cff. Read the comment docs.

dpc10ster commented 5 years ago

Thanks Jason; I see the code passes Travis checks! You will soon know more about GitHub collaboration than I know. Best, Dev

dpc10ster commented 5 years ago

I can now pull your changes and see them on my computer.

dpc10ster commented 5 years ago

I can't seem to merge it to my splitPlot branch; will reopen issue temporarily

dpc10ster commented 5 years ago

WORKS!I I have your code on my computer and merged into my splitPlot branch.

GitHub Rocks! Thanks Jason.

(Tip: you can switch between Write and Preview tabs to format your comments; GitHub supports markdown, a way of formatting text in a text-only - and highly portable - file. Try it!).