Treatment Types

DiffinDiffsBase.DynamicTreatmentType
DynamicTreatment{S<:TreatmentSharpness} <: AbstractTreatment

Specify an absorbing binary treatment with effects allowed to evolve over time. See also dynamic.

Fields

  • time::Symbol: column name of data representing calendar time.
  • exc::Tuple{Vararg{Int}}: excluded relative time.
  • s::S: an instance of TreatmentSharpness.
DiffinDiffsBase.dynamicFunction
dynamic(time::Symbol, exc, s::TreatmentSharpness=sharp())

Construct a DynamicTreatment with fields set by the arguments. By default, s is set as SharpDesign. When working with @formula, a wrapper method of dynamic calls this method.

Examples

julia> dynamic(:month, -1)
Sharp dynamic treatment:
  column name of time variable: month
  excluded relative time: -1

julia> typeof(dynamic(:month, -1))
DynamicTreatment{SharpDesign}

julia> dynamic(:month, -3:-1)
Sharp dynamic treatment:
  column name of time variable: month
  excluded relative time: -3, -2, -1

julia> dynamic(:month, [-2,-1], sharp())
Sharp dynamic treatment:
  column name of time variable: month
  excluded relative time: -2, -1