This directory contains all scripts to reproduce the simulation and real-data results. The entry point is Run_all.R, which sequentially sources the individual result scripts. All the tables and figures in the main paper and the supplementary material will appear in the output/ folder after running the scripts.
required_packages.R: script to install all the necessary R packages to reproduce our resultsRun_all.R: the main script to run all the result scriptscode_result/: folder containing all the individual result scripts for simulation and real-data analysisResult_main_500.Rproduces main simulation results with sample size n=500 and covariates dimension d=2, i.e., Table 1 in the main paper, Tables S4–S8 in the supplementary material, and Figures S2–S7 in the supplementary material.Result_main_diff_np.Rproduces simulation results with different (n, d) combinations, including (250, 2), (1000, 2), and (500, 10), i.e., Tables S1–S3 in the supplementary material.Result_inconsistency.Rproduces simulation results on the inconsistency issue of Wang's method, i.e., Figure 1 in the main paper and Figure S1 in the supplementary material.Result_alter_smoothing.Rproduces simulation results with alternative smoothing techniques, i.e., Tables S9 and S10 in the supplementary material.Result_DR.Rproduces simulation results about the doubly robust property of our SCL method, i.e., Tables S11–S16 in the supplementary material.Result_nonconvexity.Rproduces simulation results for nonconvexity issue of Wang's method stated in Section S1.1 in the supplementary material.Result_realdata.Rproduces real-data analysis results on the AIDS study data, i.e., Tables 2 and 3 in the main paper.Result_smooth_survival.Rproduces plot of the survival functions and the smooth survival functions, i.e., Figure 2 in the main paper.Result_kernels.Rproduces simulation results with different kernel choices, i.e., Tables S17 and S18 in the supplementary material.Result_survival.Rproduces simulation results for survival data, i.e., Tables S19 and Figure S8 in the supplementary material.
code_functions/: folder containing all the functions used in the simulation and real-data analysis.function_main.R: functions including our SCL method, the competing methods, and auxiliary functionsfunction_inconsistency.R: functions for the inconsistency issue of Wang's methodfunction_nonconvexity.R: functions for the nonconvexity issue of Wang's methodfunction_kernel.R: functions to test the robustness of our SCL method with different kernel choicesfunction_survival.R: functions to implement our SCL method for survival datasimulation_case1.R: functions to generate data for case 1 in the main paper and execute the competing methodssimulation_case2.R: functions to generate data for case 2 in the main paper and execute the competing methodssimulation_case3.R: functions to generate data for case 3 in the main paper and execute the competing methodssimulation_case1_dr.R: functions to test the doubly robust property of our SCL method in case 1simulation_case2_dr.R: functions to test the doubly robust property of our SCL method in case 2simulation_case3_dr.R: functions to test the doubly robust property of our SCL method in case 3simulation_inconsistency.R: functions on the inconsistency issue of Wang's methodsimulation_nonconvexity.R: functions on the nonconvexity issue of Wang's methodsimulation_kernel.R: functions to generate data and test the robustness of our SCL method with different kernel choicessimulation_survival.R: functions to generate survival data and test our SCL method for survival datasimulation_alter_smoothing.R: functions to test the alternative smoothing techniques for discrete outcomes for our SCL methodrealdata_value.R: functions to clean the AIDS study data (real data) and implement the cross-validated to evaluate competing methods in value functionrealdata_DC.R: functions to clean the AIDS study data (real data) and implement the cross-validated to evaluate competing methods in decision concordance (DC)
output/: folder to save all the tables and figures in the main paper and the supplementary material
R version 4.3.1.
Number of cores used: 16.
The necessary packages to reproduce our results are as follows. You can run the script required_packages.R to intall all these packages.
- cowplot_1.1.3
- doParallel_1.0.17
- dplyr_1.1.4
- foreach_1.5.2
- ggplot2_3.5.1
- ggtext_0.1.2
- glmnet_4.1.8
- grid_4.3.1
- knitr_1.43
- latex2exp_0.9.6
- MASS_7.3.60
- mpath_0.4.2.25
- parallel_4.3.1
- quantoptr_0.1.3
- quantreg_5.97
- speff2trial_1.0.5
- tidyr_1.3.1
- WeightSVM_1.7.11
- survival_3.5.5
Execute:
r source("./Run_all.R")
This will run:
code_result/Result_main_500.Rcode_result/Result_main_diff_np.Rcode_result/Result_alter_smoothing.Rcode_result/Result_inconsistency.Rcode_result/Result_DR.Rcode_result/Result_nonconvexity.Rcode_result/Result_realdata.Rcode_result/Result_smooth_survival.Rcode_result/Result_kernels.Rcode_result/Result_survival.R
All the tables and figures will be saved in the output/ folder.