New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

microt-compliance

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microt-compliance

A package that transform intermediate log files into features of interest for analysis

0.1.0
PyPI
Maintainers
1

Introduction

This 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 modeling

Outcomes: compliance rate

Predictors:

  • Within-person or prompt level:

    • time of the day
    • day of the week
    • day in study
    • activity level
    • battery level
    • location
  • Between-person or person level

    • age
    • gender
    • study mode

Exploratory Discussions on Factors

Detailed discussions on factors can be found here.

Features Overview

Smartphone

OutcomeVariable TypeData Source
Answer StatusCategorical (Completed, CompletedThenDismissed, PartiallyCompleted, Started/NeverStarted, NeverPrompted, OverwrittenByDaily)./logs/PromptResponses.log.csv
FeatureLevelEffect TypeVariable TypeData Source
Day of the WeekLevel 1 (Within-person or prompt level)RandomCategorical (Mon-Sat: 0-6)./logs/.../PromptResponses.log.csv
Time of the DayLevel 1 (Within-person or prompt level)RandomCategorical (morning, afternoon, evening/night)./logs/.../PromptResponses.log.csv
Days 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.csv
Charging StatusLevel 1 (Within-person or prompt level)RandomBinary (True/False)./data/.../Battery.##.event.csv
Location (LOC)Level 1 (Within-person or prompt level)Random[Latitude, Longitude]./data/.../GPS.csv
Phone LockLevel 1 (Within-person or prompt level)RandomBinary (Phone Locked/Phone Unlocked)./data/.../AppEventCounts.csv
Last Phone Usage DurationLevel 1 (Within-person or prompt level)RandomNumeric (minutes)./data/.../AppEventCounts.csv
Screen StatusLevel 1 (Within-person or prompt level)RandomBinary (Screen On/Screen Off)./logs/.../SystemBroadcastReceiver.csv
Wake/Sleep TimeLevel 1 (Within-person or prompt level)RandomLocal time (2021-01-01 06:30:00 CST)daily report

Smartwatch

OutcomeLevelEffect TypeVariable TypeData Source
Compliance RateLevel 1 (Within-person or prompt level)RandomNumeric./logs-watch/PromptResponses.log.csv
Level 2 (Between-person or person level)Random
FeatureLevelEffect TypeVariable TypeData Source
Day of the WeekLevel 1 (Within-person or prompt level)RandomCategorical (Mon-Sat: 0-6)./logs-watch/.../PromptResponses.log.csv
Time of the DayLevel 1 (Within-person or prompt level)RandomCategorical (morning, afternoon, evening/night)./logs-watch/.../PromptResponses.log.csv
Days 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.csv
Location (LOC)Level 1 (Within-person or prompt level)Random
Activity Level (ACT)Level 1 (Within-person or prompt level)Random

Code Usage for Feature Matrix Generation

  • This project has been wrapped up as a Pypi 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 password

Special Notice

  • Delete misc folder before running code, if new participants' intermediate folder has been created.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts