transmission
transmission
transmission(from::Int, arr1::AbstractMatrix{T}, arr2::AbstractMatrix{T}, q::Q; method = :BOmega) where {T}
Given a transmission condition q, calculate the transmission effect using the either the :BOmega method (the default), or the :irfs method.
Arguments
from::Int: Shock number.arr1::AbstractMatrix{T}. In case of:BOmegathis must beB, in case of:irfsthis must beirfs. See the documentation for the specific methods fortransmission(..., ::Type{Val{:BOmega}})andtransmission(...,::Type{Val{:irfs}}).arr2::AbstractMatrix{T}: In case of:BOmegathis must beOmega, in case of:irfsthis must beirfs_ortho. See the documentation for the specific methods fortransmission(..., ::Type{Val{:BOmega}})andtransmission(...,::Type{Val{:irfs}}).q::Q: A transmission condition. See alsoQ.
Keyword Arguments
method::Symbol: Either:BOmegain which case the transmission effect will be calculated using the second method in Wegner et al (2024), or:irfsin which case the transmission effect is calculated using the first method in Wegner et al (2024).
Returns
- Returns a
Vector{T}with entryicorresponding to the transmission effect on variable \(x_i\). If \(x_k\) is the variable in the transmission condition with the highest subscript, then all entries in the returned vector with index less thatnkareNaNsince interpretation of those results is nonsensical.
Exa```{julia}es
k = 6
h = 3
s = "(x1 | x2) & !x3"
cond = make_condition(s)
B = randn(k*(h+1), k*(h+1))
Omega = randn(k*(h+1), k*(h+1))
effect = transmission(1, B, Omega, cond; method = :BOmega)
effect = transmission(1, B, Omega, cond) # same as above; default is :BOmega
irfs = randn(k, k, h+1)
irfs_ortho = randn(k, k, h+1)
irfs = to_transmission_irfs(irfs)
irfs_ortho = to_transmission_irfs(irfs_ortho)
effect = transmission(1, irfs, irfs_ortho, cond; method = :irfs)
transmission
transmission(
from::Int,
B::AbstractMatrix{T},
Omega::AbstractMatrix{T},
q::Q,
::Type{Val{:BOmega}}
) where {T}
Given a transmission condition q, calculate the transmission effect using the :BOmega method.
Arguments
from::Int: Shock number.B::AbstractMatrix{T}: Part of the systems representation in Wegner et al (2024).Omega::AbstractMatrix{T}: Part of the systems representation in Wegner et al (2024).q::Q: A transmission condition. See alsoQ.
Returns
- Returns a
Vector{T}with entryicorresponding to the transmission effect on variable \(x_i\). If \(x_k\) is the variable in the transmission condition with the highest subscript, then all entries in the returned vector with index less thatnkareNaNsince interpretation of those results is nonsensical.
Exa```{julia}es
transmission
transmission(from::Int,
irfs::AbstractMatrix{T},
irfs_ortho::AbstractMatrix{T},
q::Q,
::Type{Val{:irfs}}
) where {T}
Given a transmission condition q, calculate the transmission effect using the :irfs method.
Arguments
from::Int: Shock number.irfs::AbstractMatrix{T}: Impulse responses. These should be in the form of the structural transmission model. See alsoto_transmission_irfs.irfs_ortho::AbstractMatrix{T}: Orthogonalised IRFs. These should be in the form of the structural transmission model. See alsoto_transmission_irfs.q::Q: A transmission condition. See alsoQ.
Returns
- Returns a
Vector{T}with entryicorresponding to the transmission effect on variable \(x_i\). If \(x_k\) is the variable in the transmission condition with the highest subscript, then all entries in the returned vector with index less thatnkareNaNsince interpretation of those results is nonsensical.
Exa```{julia}es
transmission
transmission(model::Model,
from::Int,
q::Q,
order::AbstractVector{<:Int},
max_horizon::Int) --> Array{<:Number, 3}
transmission(model::Model,
method::AbstractIdentificationMethod,
from::Int,
q::Q,
order::AbstractVector{<:Int},
max_horizon::Int) --> Array{<:Number, 3}
transmission(model::Model,
from::Int,
q::Q,
order::AbstractVector{Symbol},
max_horizon::Int) --> Array{<:Number, 3}
transmission(model::Model,
method::AbstractIdentificationMethod,
from::Int,
q::Q,
order::AbstractVector{Symbol},
max_horizon::Int) --> Array{<:Number, 3}
Compute the transmission effect of a transmission channel defined by the condition q. If model is a reduced-form model, method will be used to identify the required structural shock.
Arguments
model::Model: A model, such as anSVAR,VAR, orLP.method::AbstractIdentificationMethod: An identification method to identify thefrom-th structural shock.from::Int: Shock number.q::Q: A transmission condition. See alsoQandmake_condition.order::AbnstractVector{<:Int}: order of variables defined by the transmission matrix using variable indices.order::AbnstractVector{Symbol}: order of variables defined by the transmission matrix using variable names.max_horizon::Int: Maximum horizon for the transmission effect.
Returns
- Returns a three dimensional array with the first dimension correspondin to the endogenous variables (in original order), the second to the shock, and the third to the horizon (from 0 to
max_horizon).