Lab#
Same actigraphy table as the walkthrough. Setup and data load are filled in. Use the Data Science Agent, and write some of the code yourself.
Question#
The walkthrough looks at condition versus control, and at weekdays versus weekends. This table also carries other columns on each person: gender, age range, education (edu), inpatient care, and the related score fields.
Do any of those relate to activity? Is the relationship different for controls and for people with depression?
# Setting up the Colab environment. DO NOT EDIT!
try:
from applied_biostats import setup_environment
except ImportError:
!pip -q install applied-biostats-helper
from applied_biostats import setup_environment
finally:
grader = setup_environment('Module12_lab')
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import pingouin as pg
Load the staged actigraphy table#
act = pd.read_csv('depresjon_minute.csv.gz', parse_dates=['timestamp'])
print('Unit of analysis reminder: person (or person-day), not minute')
print('n people:', act['person_id'].nunique())
print(act['group'].value_counts())
print('n minute rows:', len(act))
act.head()
Continue with the Data Science Agent#
Explore those columns with the agent and with code you type yourself. Any hypothesis test should print n and the observational unit. Write a short conclusion you can tie to a figure or table.