This repository contains the code used to implement the proposed methods and reproduce the simulation and real data results in the "Association and Independence Test for Random Objects".
This folder contains the code for the proposed methods in Section 5 and the related methods used in the simulation studies.
profile.test.R: main function for the proposed profile independence test in Section 3.conditional.test.R: main function for the proposed conditional independence test in Section 4.ProfileTestDemo.RandConditiionTestDemo.R: small demo scripts for the two proposed tests.ProfileTestParallel.RandConditionalTestParallel.R: parallel scripts used to run the large-scale simulation studies on a server.spectrum.R: code for the spectrum test in Supplement Section S.6.data_ana_spectrum.R: code to generate Figure S.3 in the Supplement.utlis.R,utlis_test.cpp, andutlis_cond_test.cpp: utility functions and compiled helper code.
This folder contains the code for the real data analysis in Section 6.
This subfolder contains the code for the HCP analysis in Section 6.1.
Data_process_resting.mandData_process_motor.m: preprocess the downloaded HCP data.Heatmap.R: generates the heatmaps in Figure 4 of the main paper.L&R_test.R: implements the left and right hemisphere analysis in Section 6.1.Whole_test.R: implements the whole-brain analysis in Supplement Section S.7.
This subfolder contains the code for the mortality analysis in Section 6.2.
preprocss_data.R: preprocesses the downloaded mortality data.AssociationCurve.R: generates Figure 5 in the main paper.ConditoinalTesting.R: implements the proposed conditional independence test for the mortality data.
- Some scripts require R packages such as
Rcpp, and the HCP preprocessing requires MATLAB.