Dear All
I am estimating a linear model with highly nonlinear constraints on coefficients.
These constraints can be written as function(coefficients)=function_name(parameters) as an external (MATLAB) function.
Because parameters are to be estimated I need to call it within the model(linear) block.
However, when I try to do so, by declaring external_function(name=function_name) and inserting line
function(COEFFCIENTS)=function_name(PARAMETERS)
inside the model block, dynare tells me that I have more equations than variables and refuses to work.
What is the way around it?
Additionally, because dynare seems to be uncomfortable with many arguments of an external function, I pass them as globals, by including lines
global PARAMETERS COEFFICIENTS;
parameters PARAMETERS COEFFICIENTS;
into both dynare file and into the corresponding MATLAB function. The function is then written as function[scalar_out) = function_name(scalar_in)
Dynare seems to forget globals half way. What is the way around it?
Many thanks
Tanya