Code for running the analysis of Samsung data