diff_diff.DeltaSD

class diff_diff.DeltaSD[source]

Bases: object

Smoothness restriction on trend violations (Delta^{SD}).

Restricts the second differences of the trend violations:

|delta_{t+1} - 2*delta_t + delta_{t-1}| <= M

When M=0, this enforces that violations follow a linear trend (linear extrapolation of pre-trends). Larger M allows more curvature in the violation path.

Parameters:

M (float) – Maximum allowed second difference. M=0 means linear trends only.

Examples

>>> delta = DeltaSD(M=0.5)
>>> delta.M
0.5
__init__(M=0.0)
Parameters:

M (float)

Return type:

None

Methods

__init__([M])

Attributes

M

M: float = 0.0
__init__(M=0.0)
Parameters:

M (float)

Return type:

None