Closed abhcs closed 7 months ago
I'd favor the second option. For example, we don't define the ACTC amount (the example parameter) prior to 2013 because we don't calculate the ACTC prior to then. We actually don't even calculate it prior to 2018 I think, so we show it more for illustration.
To take the second option further: we could restrict parameter changes to years in which we offer microsimulation outputs--currently 2021-2025. There are some edge case policies that depend on parameter values prior to then even for computing current effects, but I think we can leave those off for now and treat pre-microsim parameter histories otherwise as illustrative.
Any parameter is a step function from Date -> Value. A canonical representation of a parameter is provided below:
The interpretation of the representation is that the parameter equals
1000
in the interval["2013-01-01", "2018-01-01")
1400
in the interval["2018-01-01", "2022-01-01")
1000
in the interval["2026-01-01", inf)
The parameter is undefined in(-inf, "2013-01-01")
.In the parameter editor, we allow the user to modify a parameter by specifying a new value for a chosen interval. For the parameter in our example, such an edit is ok if the interval intersects
["2013-01-01", inf)
. However, let's say that the user specifies the value500
for["2010-01-01", "2011-12-31"]
. Now the parameter must be defined for["2010-01-01", "2011-12-31"]
, then undefined for["2012-01-01", "2013-01-01")
, and then defined for["2013-01-01", inf)
. This new parameter cannot be represented in the canonical form. Currently, we ignore the right endpoint of the user-specified interval, i.e.,"2011-12-31"
, and decide that the new parameter is given by:There are two possible fixes for this error:
(-inf, inf)
at all times, perhaps by adding a mandatory entry of the form"-inf": value
in each parameter."2013-01-01"
in the example.