Package: microt-prompt
IntroductionThis repository include Python scripts that transform raw sensor data collected from Android mobile devices into features of interest for analysis.Current research topic: identify contextual prompt-level factors that predict response or no response in microEMA.Statistical methodology: multi-level modelingOutcomes: compliance ratePredictors:Within-person or prompt level:time of the dayday of the weekday in studyactivity levelbattery levellocationBetween-person or person levelagegenderstudy modeExploratory Discussions on FactorsDetailed discussions on factors can be foundhere.Features OverviewSmartphoneOutcomeVariable TypeData SourceAnswer StatusCategorical (Completed, CompletedThenDismissed, PartiallyCompleted, Started/NeverStarted, NeverPrompted, OverwrittenByDaily)./logs/PromptResponses.log.csvFeatureLevelEffect TypeVariable TypeData SourceDay of the WeekLevel 1 (Within-person or prompt level)RandomCategorical (Mon-Sat: 0-6)./logs/.../PromptResponses.log.csvTime of the DayLevel 1 (Within-person or prompt level)RandomCategorical (morning, afternoon, evening/night)./logs/.../PromptResponses.log.csvDays in StudyLevel 1 (Within-person or prompt level)RandomNumeric (numeric value of day from the first day)./logs (start from the first date of created folder)Battery LevelLevel 1 (Within-person or prompt level)RandomNumeric (Battery%)./data/.../Battery.##.event.csvCharging StatusLevel 1 (Within-person or prompt level)RandomBinary (True/False)./data/.../Battery.##.event.csvLocation (LOC)Level 1 (Within-person or prompt level)Random[Latitude, Longitude]./data/.../GPS.csvPhone LockLevel 1 (Within-person or prompt level)RandomBinary (Phone Locked/Phone Unlocked)./data/.../AppEventCounts.csvLast Phone Usage DurationLevel 1 (Within-person or prompt level)RandomNumeric (minutes)./data/.../AppEventCounts.csvScreen StatusLevel 1 (Within-person or prompt level)RandomBinary (Screen On/Screen Off)./logs/.../SystemBroadcastReceiver.csvWake/Sleep TimeLevel 1 (Within-person or prompt level)RandomLocal time (2021-01-01 06:30:00 CST)daily reportSmartwatchOutcomeLevelEffect TypeVariable TypeData SourceCompliance RateLevel 1 (Within-person or prompt level)RandomNumeric./logs-watch/PromptResponses.log.csvLevel 2 (Between-person or person level)RandomFeatureLevelEffect TypeVariable TypeData SourceDay of the WeekLevel 1 (Within-person or prompt level)RandomCategorical (Mon-Sat: 0-6)./logs-watch/.../PromptResponses.log.csvTime of the DayLevel 1 (Within-person or prompt level)RandomCategorical (morning, afternoon, evening/night)./logs-watch/.../PromptResponses.log.csvDays in StudyLevel 1 (Within-person or prompt level)RandomNumeric (numeric value of day from the first day)./logs-watch (start from the first date of created folder)Battery LevelLevel 1 (Within-person or prompt level)RandomNumeric (Battery%)./data-watch/.../Battery.##.event.csvLocation (LOC)Level 1 (Within-person or prompt level)RandomActivity Level (ACT)Level 1 (Within-person or prompt level)RandomCode Usage for Feature Matrix GenerationThis project has been wrapped up as aPypi package. Use pip to install.Clone this project and run locally.#!python
python main_ema.py [intermediate_participant_path] [output_dir_path] [date_in_study] [decryption_password]e.g., python main_ema.py G:...\intermediate_file\participant_id C:...\output_folder 2021-01-01 passwordSpecial NoticeDelete misc folder before running code, if new participants' intermediate folder has been created.