Description Usage Arguments Details Value
View source: R/cough_rate_distribution.R
Summarize cough rates and retrieve hourly cough counts for use in histogram-production and cough distribution modeling.
1 | cough_rate_distribution(ho, min_session = 0.5)
|
ho |
A |
min_session |
allows you to define the minimum amount of monitoring required
during a single hour in order for that hour to be included in the cough rate estimation.
For example, sometimes an hour of day contains only a few minutes of monitoring for a user;
that makes for a pretty poor estimate of that hour’s cough rate.
The default |
This function can take both aggregated data (ho) and user-separated (ho_by_user),
but it does best with the latter. It returns metrics about hourly cough rates
based on an hour-by-hour analysis. Similar to the inputs in hyfe_summarize(),
the argument min_session
The slot $details
returns a dataframe with all details you might need to analyze these rates (essentially the hours table from a hyfe object).
A list with named slots: overall
contains a dataframe with the mean and SD of hourly cough rate for the entire dataset.
These metrics are based on the mean/variance for each individual user, i.e.,
mean_of_mean
is the average of mean cough rates across users.
When using a hyfe
object prepared with by_user=TRUE
,
this means that each user is weighted equally in the summary statistics.
When using a hyfe
object in which all user data are aggregated together,
users will be weighted according to their session time;
The slot $users
contains a dataframe with the mean and SD cough rate for each user.
The slot $rates
returns a numeric vector of hourly cough rates that satisfy the minimum monitoring threshold:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.