Skip to content

Commit

Permalink
Update get_functions.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
thorek1 authored Jan 8, 2024
1 parent bab14a0 commit 9cd33c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/get_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2896,15 +2896,15 @@ function get_loglikelihood(𝓂::β„³,
filter = :inversion
end

@assert size(data)[1] <= sum(𝓂.timings.nExo) "Cannot estimate model with more observables than exogenous shocks. Have at least as many shocks as observable variables."
@assert size(data)[1] <= 𝓂.timings.nExo "Cannot estimate model with more observables than exogenous shocks. Have at least as many shocks as observable variables."

observables = @ignore_derivatives collect(axiskeys(data,1))

@assert observables isa Vector{String} || observables isa Vector{Symbol} "Make sure that the data has variables names as rows. They can be either Strings or Symbols."

observables_symbols = @ignore_derivatives observables isa String_input ? observables .|> Meta.parse .|> replace_indices : observables

@assert length(setdiff(observables_symbols, 𝓂.var)) == 0 "The following symbols in the first axis of the conditions matrix are not part of the model: " * repr(setdiff(observables_symbols,𝓂.var))
@assert @ignore_derivatives length(setdiff(observables_symbols, 𝓂.var)) == 0 "The following symbols in the first axis of the conditions matrix are not part of the model: " * repr(setdiff(observables_symbols,𝓂.var))

@ignore_derivatives sort!(observables)

Expand Down

0 comments on commit 9cd33c2

Please sign in to comment.