Treatment Terms

DiffinDiffsBase.TermSetType
TermSet <: AbstractSet{AbstractTerm}

Wrapped Set{AbstractTerm} that specifies a collection of terms. Commonly used methods for Set work in the same way for TermSet.

Compared with StatsModels.TermOrTerms, it does not maintain order of terms but is more suitable for dynamically constructed terms.

DiffinDiffsBase.TermSetMethod
TermSet([itr])
TermSet(ts::Union{Int, Symbol, AbstractTerm}...)

Construct a TermSet from a collection of terms. Instead of passing an iterable collection, one may pass the terms as arguments directly. In the latter case, any Int or Symbol will be converted to a Term. See also termset, which is an alias for the constructor.

DiffinDiffsBase.TreatmentTermType
TreatmentTerm{T<:AbstractTreatment} <: AbstractTerm

A term that contains specifications on treatment and parallel trends assumption. See also treat.

Fields

  • sym::Symbol: the column name of data representing treatment status.
  • tr::T: a treatment type that specifies the causal parameters of interest.
  • pr::P: a parallel type that specifies the parallel trends assumption.
DiffinDiffsBase.parse_intercept!Method
parse_intercept(ts::TermSet)

Remove any ConstantTerm or InterceptTerm and return Boolean values indicating whether terms explictly requiring including/excluding the intercept exist.

This function is useful for obtaining a unique way of specifying the intercept before going through the schemaapply_schema pipeline defined in StatsModels.

DiffinDiffsBase.termsetMethod
termset([itr])
termset(ts::Union{Int, Symbol, AbstractTerm}...)

Construct a TermSet from a collection of terms. Instead of passing an iterable collection, one may pass the terms as arguments directly. In the latter case, any Int or Symbol will be converted to a Term.