make_condition
make_condition
make_condition(s::String)
make_condition(s_y::String, order::AbstractVector{<:Int})
Make a transmission condition, i.e. Q(b), out of a string.
Transmission channels are described using Boolean statements involving the variables in the dynamic model. make_condition allows for specifying these Boolean conditions as a string which is then converted to an internal representation allowing the computation of transmission channels.
Two ways of specifying the Boolean conditions exist:
make_condition(s::String)takes the Boolean condition in the systems form of Wegner et al (2024), i.e. variables must start withxfollowed by a number. For example, given a three variable VAR(1),y_{1,t} -> x_1,y_{2, t} -> x_2,y_{3, t} -> x_3,y_{1, t+1} -> x_4,y_{2, t+1} -> x_5, … Boolean statements then involve expressions in thexvariables and define which paths can be taken. Each path involved in the transmission mechanism must satisfy the Boolean statement.make_condition(s_y::String, order::AbstractVector{<:Int})does the same as the first method, however the Boolean condition can be specified using the variables of the dynamic systems, i.e.y. Variables must then be specified usingy_{i,t}whereiis the variable number andtis the period. At all timest >= 0with0denoting the contemporaneous horizon.
Arguments
s::String: A Boolean statement given as a string. Variables must start withxfor them to be valid variables.s_y::String: A Boolean statement given as a string. Variabls must have the formy_{i,t}whereiis the variable number andt >= 0is the time period.t=0corresponds to the contemporaneous horizon.order::AbstractVector{<:Int}: The variable ordering defined by the transmission matrix.
Returns
- Returns a transmission condition. See also
Q.
Exa```{julia}es
Notes
- Boolean conditions can consist of AND (&), NOT (!), OR (|), and parentheses.
- The resulting transmission condition can be used in
transmissionto calculate the transmission effect.