Calculates the exposure rate applied to each year provided month of policy implementation and number of years to full implementation
Source:R/calculate-exposure.r
calculate_exposure.Rd
Calculates the exposure rate applied to each year provided month of policy implementation and number of years to full implementation
Arguments
- month
month of year (as integer) that policy takes effect
- n_years
number of months until full implementation in effect
- monthly_effect
increment of exposure to apply each month; default is ((1/n_years) / 12) (constant over the period)
Examples
# Calculate uniform increase in policy effect which ramps up across 10 years
# Assume policy starts in July of the first year, then continues for 10 years
starting_month <- 7
implementation_years <- 10
# Assume some policy effect (which is the target effect for simulations)
policy_effect <- 2
exposure_by_year <- calculate_exposure(starting_month, implementation_years)
# Based on exposure by year, calculate policy effect by year:
plot(policy_effect*exposure_by_year)