Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Code for Independence Test for Random Objects

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".

Folder overview

Simulation/

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.R and ConditiionTestDemo.R: small demo scripts for the two proposed tests.
  • ProfileTestParallel.R and ConditionalTestParallel.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, and utlis_cond_test.cpp: utility functions and compiled helper code.

RealData/

This folder contains the code for the real data analysis in Section 6.

RealData/HCP/

This subfolder contains the code for the HCP analysis in Section 6.1.

  • Data_process_resting.m and Data_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.

RealData/Mortality/

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.

Notes

  • Some scripts require R packages such as Rcpp, and the HCP preprocessing requires MATLAB.

About

Code for Independence Test for Random Objects

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages