study_py <- expose_py(census_dat, "2019-12-31",
target_status = "Surrender") |>
add_transactions(withdrawals) |>
left_join(account_vals, by = c("pol_num", "pol_date_yr"))
trx_res <- study_py |> group_by(pol_yr) |>
trx_stats(percent_of = "av_anniv", combine_trx = TRUE)
plot_utilization_rates(trx_res)
Run the code above in your browser using DataLab