hyfe_summarize: Summarize Hyfe data

Description Usage Arguments Details Value

View source: R/hyfe_summarize.R

Description

This function produces summary tables for your hyfe object.

Usage

1
hyfe_summarize(ho, cutoff_hourly = 30, cutoff_daily = 4)

Arguments

ho

A hyfe object, which is generated by process_hyfe_data(). See full details and examples in the package vignette.

cutoff_hourly

This function uses sample size cutoffs to ensure that rates are not swung to extremes due to insufficient monitoring. For example, an hour of day with 1 cough detection but only 1 minute of monitoring would produce an hourly cough rate estimate of 60 coughs per hour. Those scenarios should be avoided. The first cutoff used is cutoff_hourly: by default, at least 30 minutes of monitoring must occur within a hour-long window of the day in order for that hour to contribute to the estimation of the hourly cough rate.

cutoff_daily

The second cutoff used; the default is that at least 4 hours of monitoring must occur within a day in order for that day to count toward the daily cough rate.

Details

If your hyfe object was processed by aggregating all users together (i.e., your call process_hyfe_data() included the argument by_user = FALSE, which is the function's default), the cough rates reported should be treated with caution: these rates are going to be biased by users with (1) a lot of monitoring time and (2) a lot of coughs. To summarize Hyfe data from multiple users in a way that is truly balanced, in which each user is weighted equally, you should use a hyfe object processed with by_user = TRUE.

Note that the cumulative counts are unaffected by these cutoffs, only the rates.

Value

A list with two slots: overall, which summarizes the entire dataset by pooling users together, and users, which summarizes each user individually. The users slot is NULL when the hyfe object provided was processed with by_user = FALSE. That users table, if available, is used to build the overall slot in which the mean rates (i.e., hourly_rate and daily_rate) are the average of each user’s mean rates, and – importantly – the variability metrics (hourly_var, hourly_sd, daily_var, daily_sd) now pertain to the variability among users.


hyfe-ai/hyfer documentation built on Dec. 20, 2021, 5:53 p.m.