Description Usage Arguments Details See Also Examples
The license history table accounts for multi-year/lifetime licenses by including
1 row for every year a license is held. The input data frame should only have 1 record
per customer-year (ensured by running rank_sale
beforehand).
1 2 | make_history(sale_ranked, yrs, carry_vars = NULL, yrs_lapse = yrs,
show_diagnostics = FALSE)
|
sale_ranked |
data frame: Sales table from which license history will be made; must include at least 3 variables (cust_id, year, duration) |
yrs |
numeric: Years in sales data (column 'year') from which to create license history |
carry_vars |
character: additional variables to carry over from previous year (for multi-year and lifetime licenses). |
yrs_lapse |
numeric: years to include in lapse calculation (defaults to yrs). If NULL, lapse will not be calculated (useful for mid-year results) |
show_diagnostics |
logical: If TRUE, will include intermediate variables in the
output dataset, necessary for running checks: |
The output data frame includes the following variables:
cust_id: Customer ID
year: License Year
carry_vars: One or more optional variables to include; ensures multi-year/lifetime records are complete in future years.
duration_run: A duration variable that accounts for multi-year/lifetimes.
lapse: Lapse next year? (1=Yes, 0=No). Only included if yrs_lapse != NULL
R3: R3 group this year (1=carried, 2=renewed, 3=reactivated, 4=recruited). Only included if more than 5 years are present.
Salic Function Reference: salic
Other license history functions: history_check
,
rank_sale
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.