Skip to contents

Runs sleeper::estimate_sleep() on complete, time-ordered raw triaxial acceleration. Input is converted to the timestamp-in-seconds format required by sleeper before the model is called.

Usage

acti_sleeper(data, epoch = 30L, model_dir)

Arguments

data

A data frame containing timestamps and triaxial acceleration.

epoch

Output epoch in seconds.

model_dir

Directory containing the sleeper model files.

Value

An acti_sleep_estimate tibble with time, sleep, sleep_probability, sleep_stage, nonwear, and method. The sleeper backend does not return probabilities or sleep stages, so those columns are NA.