Description Usage Arguments Value
View source: R/plot_cough_rate_error.R
How much monitoring is enough to estimate the overall cough rate accurately? This is a difficult question to answer, but this plot can help approximate it. It shows the cough rate estimate based on 1 hour of monitoring, 2 hours, 3 hours, ..., up until the entire cough record. The plot also displays the 'overall' cough rate, using the entire monitoring record, and horizontal lines indicating a range of acceptable error around the 'true' rate.
1 | plot_cough_rate_error(hours, cutoff = 0.5, min_error = 0.1, toplot = TRUE)
|
hours |
A dataframe of hourly cough counts. Minimum requirements:
A column |
cutoff |
The amount of monitoring within an hour in order for that hour to be included in cough rate calculations. Default is 0.5 (half hour of monitoring during the hour). |
min_error |
Minimum acceptable error. Default is 10% (0.1). |
toplot |
If |
The hours
dataframe with additional columns:
estimate
, the cough rate estimate up to that hour of monitoring;
error
, the error in that estimate based upon the overall cough rate;
prop_error
, the proportional error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.