Walkthrough#
Skeletal notebook for agent-assisted exploration. Setup and data load are filled in. Continue with the Data Science Agent.
Question#
Is activity lower in the condition group than in controls, and does weekday versus weekend change the comparison?
The study reported lower daytime activity in depression, and a larger gap on weekends than on weekdays.
# 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_walkthrough')
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#
Prompt the agent with the person-level question. Require that any hypothesis test print n and the observational unit. Canvas prompts from the recorded session will be added after class.