
Please note that this Code Ocean capsule doesn't include codes for all the simulation settings due to the extensive time needed for running simulation. Similarly, hyper-parameter selection is not included in this Code Ocean capsule.

Therefore, the result here will not be exactly the same as the results in the paper.

Please check our Github repository for more information. The link of the GitHub repo is:
https://github.com/jiem3/MultiFuncClustering.

There are two files and two folders in this Code Ocean capsule, which are listed below.

1. Files:

README.md

funcs.r: contains functions used in this paper.

main.r: file to run all R codes in the capsule.


2. Folders:

    simulation: contains codes used for simulation analysis. There are 2 more folders inside it, which are listed below.

        no penalty: contains simulation codes related to no variable selection clustering.

        penalty: contains simulation codes related to clustering with variable selection, using the three penalties mentioned in the paper.

        There are 3 files in each of the two folders.

        Simulation_N50.r,  Simulation_nois8.r, and Simulation_var2.R.
        
        The three files correspond to simulation settings with sample size 50, number of noisy sensors 8, and signal strength 2.

        Please check our GitHub repo for codes of the other simulation settings mentioned in the paper. 

    SystemB: contains codes for the System B data analysis. There are one file insdie the folder:

        script_sysB.r: major R codes used for System B data analysis in the paper.

    The data used for the analysis is in the "data folder", which are listed below:
    
        sysBpca.rds: functional principal component scores of the System B data used in the paper.

        pca3: contains the saved EM results with 10 different starting points in System B data analysis.
