# Figures for Nested Data Paper

    # Library ----

    library(dplyr)
    library(iMRMC)
    library(mvtnorm)
    library(NestMRMC)
    library(doParallel)
    library(ggplot2)
    library(gridExtra)

## Figure 3 in the paper–histogram of number of positive and negative ROIs in

## balance and unbalance design

## Figure 4

### Data description for Figure 4

- The results in these files assume that the truth labels of positive and negative ROIs are fixed across the 10,000 simulations, hence fixed is in the name of the file.

- In a balanced design each patient has approximately the same number of positive and negative ROIs. In an unbalanced design each patient tends to have unequal number of positive and negative ROIs. Note that for both designs the overall positive and negative ROIs number should be about the same, since the overall probabilities to be positive ROI and negative ROI are 0.5 and 0.5.

- sim_result_blance_fixed_cov05062021.csv Contains the summarized statistics from 10,000 simulations results in 75 configurations for 100 patients and 10 ROIs per patient. All simulations use the balanced design and fixed truth labels. The 75 configurations are all the possible combinations of 3 AUC values (0.7, 0.8, 0.9), 5 covariance values (0.1, 0.25, 0.5, 0.75, 0.9) and 5 \(\rho\) values (0.1, 0.25, 0.5, 0.75, 0.9). The details of parameters settingts in the 75 configurations is available in the Table 1.

- sim_result_unblance_fixed_cov05062021.csv Contains the summarized statistics from 10,000 simulations for 75 configurations for 100 patients and 10 ROIs per patient. All simulations use the unbalanced design and fixed truth labels.The details of parameters settings in the 75 configurations is available in the Table 1.

- There are 16 columns in the both files. The detailed information for each column is given at the end of this file.

## Figure 5

### Data description for Figure 5

- The results in these files assume that the truth labels of positive and negative ROIs are randomly assigned across the 10,000 simulations, hence unfixed is in the name of the file.

- In a balanced design each patient has approximately the same number of positive and negative ROIs. In an unbalanced design each patient tends to have unequal number of positive and negative ROIs. Note that for both designs the overall positive and negative ROIs number should be about the same, since the overall probabilities to be positive ROI and negative ROI are 0.5 and 0.5.

- sim_result_blance_unfixed_cov005182021.csv Contains the summarized statistics from 10,000 simulations results in 75 configurations for 100 patients and 10 ROIs per patient. All simulations use the balanced design and unfixed truth labels. The 75 configurations are all the possible combinations of 3 AUC values (0.7, 0.8, 0.9), 5 covariance values (0.1, 0.25, 0.5, 0.75, 0.9) and 5 \(\rho\) values (0.1, 0.25, 0.5, 0.75, 0.9). The details of parameters settingts in the 75 configurations is available in the Table 1.

- sim_result_unblance_unfixed_cov05182021.csv Contains the summarized statistics from 10,000 simulations for 75 configurations for 100 patients and 10 ROIs per patient. All simulations use the unbalanced design and unfixed truth labels.The details of parameters settings in the 75 configurations is available in the Table 1.

- There are 16 columns in the both files. The detailed information is provided in the end.

# Figure 6

### Data description for Figure 6

- The results in these files assume that the truth labels of positive and negative ROIs are randomly assigned across the 10,000 simulations, hence unfixed is in the name of the file.

- In a balanced design each patient has approximately the same number of positive and negative ROIs. In an unbalanced design each patient tends to have unequal number of positive and negative ROIs. Note that for both designs the overall positive and negative ROIs number should be about the same, since the overall probabilities to be positive ROI and negative ROI are 0.5 and 0.5.

- sim_result_blance_unfixed_cov10042021.csv Contains the summarized statistics from 10,000 simulations results in 75 configurations for 100 patients and 10 ROIs per patient. All simulations use the balanced design and unfixed truth labels. The 75 configurations are all the possible combinations of 3 AUC values (0.7, 0.8, 0.9), 5 covariance values (0.1, 0.25, 0.5, 0.75, 0.9) and 5 \(\rho\) values (0.1, 0.25, 0.5, 0.75, 0.9). The details of parameters settingts in the 75 configurations is available in the Table 1.

- sim_result_unblance_unfixed_cov10042021.csv Contains the summarized statistics from 10,000 simulations for 75 configurations for 100 patients and 10 ROIs per patient. All simulations use the unbalanced design and unfixed truth labels.The details of parameters settingts in the 75 configurations is available in the Table 1.

- sim_Nancy_blance_unfixed_cov10042021.csv Contains the summarized statistics from 10,000 simulations for 75 configurations for 100 patients and 10 ROIs per patient based on Nancy’s method. All simulations use the balanced design and unfixed truth labels.The details of parameters settingts in the 75 configurations is available in the Table 1.

- sim_Nancy_unblance_unfixed_cov10042021.csv Contains the summarized statistics from 10,000 simulations for 75 configurations for 100 patients and 10 ROIs per patient based on Nancy’s method. All simulations use the unbalanced design and unfixed truth labels.The details of parameters settingts in the 75 configurations is available in the Table 1.

- There are 16 columns in the above files. The detailed information is provided in the end.

## Columns in the above files

- R1AUC_MEAN: The mean of reader 1 between-cases AUC estimates among 10,000 simulations.
- R2AUC_MEAN: The mean of reader 2 between-cases AUC estimates among 10,000 simulations.
- R1AUC_VAR: The variance of reader 1 between-cases AUC estimates among 10,000 simulations.
- R2AUC_VAR: The variance of reader 2 between-cases AUC estimates among 10,000 simulations.
- R1VAR_MEAN: The mean of reader 1 between-cases AUC variance estimates among 10,000 simulations.
- R2VAR_MEAN: The mean of reader 2 between-cases AUC variance estimates among 10,000 simulations.
- R1VAR_VAR: The variance of reader 1 between-cases AUC variance estimates among 10,000 simulations.
- R2VAR_VAR: The variance of reader 2 between-cases AUC variance estimates among 10,000 simulations.
- R1R2COV_MEAN: The mean of reader 1 and reader 2 between-cases AUC covariance estimates among 10,000 simulations.
- R1R2COV_VAR: The variance of reader 1 and reader 2 between-cases AUC covariance estimates among 10,000 simulations.
- TRUE_VAR_MEAN: The mean of between-cases AUC estimator’s theoretical variances among 10,000 simulations.
- TRUE_VAR_VAR: The variance of between-cases AUC estimator’s theoretical variances among 10,000 simulations.
- TRUE_COV_MEAN: The mean of between-cases AUC estimator’s theoretical covariances among 10,000 simulations.
- TRUE_COV_VAR: The variance of between-cases AUC estimator’s theoretical covariances among 10,000 simulations.
- R1R2COV_MC: The covariance between reader 1 and reader 2 between-cases AUC estimates among 10,000 simulations.
- TRUE_AUC: The true AUC values for the simulated data.

## 75 configurations in the simulation

    Error in `[.data.frame`(sim_result_blance, , 16:18) : 选择了未定义的列

[encoded data, 37540 characters]