Description Usage Arguments See Also
View source: R/dashboard-metrics.R
Calculate all 5 metrics for a permission
1 2 3 4 5 6 7 8 9 10 11 12 13 | calc_metrics(
history,
pop_county,
sale,
dashboard_yrs,
part_ref = NULL,
res_type = NULL,
segs = c("tot", "res", "sex", "agecat", "county"),
tests = c(tot = 20, res = 35, sex = 35, agecat = 35, county = 70),
tests_recruits = c(tot = 30, res = 45, sex = 45, agecat = 45, county = 150),
scaleup_test = 25,
rate_test = 1
)
|
history |
data frame: input history table for permission |
pop_county |
data frame: population table for state |
sale |
data frame: sales table for permission |
dashboard_yrs |
numeric: years to be included in summary |
part_ref |
list: summary of parent permission to be used as reference for privilege rate. If NULL, calculates participation rate using pop_county |
res_type |
identifies residency specific permissions ("Resident", "Nonresident", NULL) |
segs |
character: vector of segment names to summarize |
tests |
test values to pass to participants & churn calculation |
tests_recruits |
test values to pass to recruits calculation |
scaleup_test |
test values to pass to scaleup_part() |
rate_test |
test values to pass to est_rate() |
Other dashboard functions:
calc_part_rate()
,
calc_part()
,
calc_priv_rate()
,
est_month()
,
est_pop()
,
est_rate()
,
fill_missing_months()
,
format_metrics()
,
write_dash()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.