This is a repository for the implementation of the paper "Smooth Tensor Decomposition with Application to Ambulatory Blood Pressure Monitoring Data". The implementation depends on the SmoothHOOI R package.
Data used in HYPNOS Application are confidential. Synthetically generated ABPM data that mimics the characteristics of data analyzed in the paper is presented in Synthetic Example.
This folder includes code for reproducing the results in Section 4 of the paper.
1a_Data Preprocessing.R: data preprocessing, including low-quality data detection and removal1b_Tensor Generation.R: organization of original data into a tensor structure2a_Autocorrelation.R: check residual autocorrelation in the ABPM data2b_Hyperparameter Tuning.R: hyperparameter tuning, including rank reduction for parsimony3_Algorithm Run.R: implementation of SmoothHOOI algorithm, with optimal hyperparameter applied4a_Result Visualization.R: visualization of temporal components and estimated curves4b_Chronotype Analysis.R: validation of the interpretation of the third temporal component (plot of g score vs sleep times)4c_Regression.R: regression analysis4d_Regression Interpretation_Effect_size.R: visualization of effect sizes of all the variables4e_Regression Interpretation_Profile.R: estimation of DBP, SBP, and HR profiles for different groups of subjects4f_CP_Analysis.R: instability of CP decomposition in ABPM data4g_MFPCA_Analysis.R: MFPCA analysis for ABPM data
This folder includes code for reproducing the results in Appendix E of the paper. The data used in this section is publicly available at https://doi.org/10.24432/C5RK5G.
This folder includes code for reproducing the results in Section 3 of the paper.
synthetic_raw.Rda: L, R, mean of G scores, covariance of G scores, and empirical residuals generated from HYPNOS Application, used to generate data for simulation studiescp_run.R: script for running CP decomposition for all the simulation settingsfpca_run.R: script for running univariate FPCA for all the simulation settingsmfpca_run.R: script for running MFPCA for all the simulation settings
In Study 1-Case 1-Fixed ranks and Study 1-Case 2-Flexible ranks folders, the following abbreviations were used to name the files:
missing_rate: random missingnessmissing_struc: structured missingnessnoise_level: noise levelp: sample sizeresult_analysis: the code for generating the figures related to simulation studies.
In the Study 2 folder, no_ar1_flexible.R and ar1_flexible.R are the scripts for running the simulation study with no AR(1) correlation and with AR(1) correlation, respectively.
no_ar1_analysis.R and ar1_analysis.R are the scripts for generating the related figures.
This folder presents a synthetic example that shows the workflow of this study and the usage of the SmoothHOOI R package.
synthetic_raw.Rda: L, R, mean of G scores, covariance of G scores, and empirical residuals generated from HYPNOS Application, used to generatesynthetic_data.Rdasynthetic_data.Rda: synthetic ABPM dataSynthetic Example.Rmd: code for this synthetic exampleSynthetic-Example.pdf: output for this synthetic example