Treatment Types
DiffinDiffsBase.AbstractTreatment
— TypeAbstractTreatment
Supertype for all treatment types.
DiffinDiffsBase.DynamicTreatment
— TypeDynamicTreatment{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 ofTreatmentSharpness
.
DiffinDiffsBase.SharpDesign
— TypeSharpDesign <: TreatmentSharpness
Assume identical treatment within each treatment group.
DiffinDiffsBase.TreatmentSharpness
— TypeTreatmentSharpness
Supertype for all types specifying the sharpness of treatment.
DiffinDiffsBase.dynamic
— Functiondynamic(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
DiffinDiffsBase.sharp
— Methodsharp()
Alias for SharpDesign()
.