

The codes require the following R packages: cluster,vegan,fda.usc,gTests,mnormt.

The Graph_Based_Two_Sample_Codes.zip file unzips to the following 5 folders: 
1. Data Codes: This contains the Sensorless Drive Diagonstic (SDD) data set and the code for Table 1.

2. Figure Codes: This folder contains the codes for generating Figures 2, 3, and 4. Each test is implemented in a separate file (CF.R, CovTest.R, FR.R, HD/MD.R, and T2.R). The gTests.R file has to be compiled before compiling the CF.R file. Each  code outputs a .txt file, which is used as input for the Figure 2,3,4.R file for generating the plots. 

3. Table Codes: This folder contains the codes for generating the tables in Figures 2, 3, and 4. Each test is implemented in a separate file (CF.R, CovTest.R, FR.R, HD/MD.R, and T2.R). The gTests.R file has to be compiled before compiling the CF.R file. 

4. KNN Codes: This folder contains the codes for generating Figures 5, and 8. The KNN test, for various values of K, is implemented in the file KNN.R. The HD/MD test is implemented in the file HD/MD.R and the Hotelling's T2 test is implemented in the file T2.R. Each code outputs a .txt file, which are used as inputs for the figure files. 

5. High Dimensional Codes: This folder contains the codes for generating the tables in  Figures 6, 7 (the performance of the tests in the high dimensional regime). Each test is implemented in a separate file (CF.R, CovTest.R, FR.R, HD/MD.R, and T2.R). The gTests.R file has to be compiled before compiling the CF.R file. 

