I’ve hit this at line 90 in TransitionPath_Case1_FHorz_PType.m
%% Check some inputs
if isstruct(GeneralEqmEqns)
if length(PricePathNames)~=length(fieldnames(GeneralEqmEqns))
fprintf('length(PricePathNames)=%i and length(fieldnames(GeneralEqmEqns))=%i (relates to following error) \n', length(PricePathNames), length(fieldnames(GeneralEqmEqns)))
error('Initial PricePath contains less variables than GeneralEqmEqns (structure) \n')
end
else
if length(PricePathNames)~=length(GeneralEqmEqns)
error('Initial PricePath contains less variables than GeneralEqmEqns')
end
end
I have 8 prices and 10 GEq equations. One “excess equations” is related to shares (sharemarket and ShareIssuance) with only P0 as the relevant price variable. The other is related to labor/capital (labormarket and CapitalOutputRatio).
What’s the best approach to sorting this: relax the error or divest of some GEq equations?
General eqm equations are equations that are supposed to evaluate to exactly zero.
If we have N equations and N parameters, we can get all the equations to be zero.
If we have N equations and M parameters, with M<N, we cannot get all the equations to be zero (unless some of the N equations are just a combo of the others, so there are not really N of them).
Note, the above logic is true of linear equations. Technically, with non-linear equations it doesn’t quite work so simply, but that tends to be unimportant in practice.
This is why toolkit insists on having same number of prices and general eqm eqns, because otherwise there is not a solution (zero) to be found.
So you should either add a GE price or drop a GE eqn, so that model is correctly set up.
PS. M>N is equally problematic, as now there are a continuum of possible solutions, and codes are just set up to find one.
I’m pleased that my mixed horizon model now converges, but not pleased with the relationships between my equations and variables.
The GEq equation I lost was the one about shares A balancing (mass must be one). I eliminated it because I didn’t see a GE price variable I could use to steer it. So I now have a system that drives the K/L ratio to more than 3 and dividend percentage to over 40%. And S is a small fraction of 1. If I could tie S to my meaningful GE prices, I’m sure the Eqm would settle closer to the numbers in OLGModel14.
Suggestions welcome!
If I wanted to steer KdivL in the transition path, should I make alpha (or one of alpha_k or alpha_l) a variable for PricePath0?
Conceptually, or mathematically? K/L is likely influenced by the alpha in the cobb-douglas production function, so mathematically likely to work, but conceptually would be a weird thing to be playing with (I can imagine reasons for putting a path on alpha, like that you think AI will shift toward more capital share and less labor share, but doing it in general eqm is a bit more unusual, also I would be inclined to micro-found it rather than just change alpha)
1 Like