Fix exceptions when prefiltering was requested with loglinear option

The check for an existing mean was based on the unlogged steady state, resulting in wrong error messages
time-shift
Johannes Pfeifer 2014-06-15 12:26:36 +02:00 committed by Johannes Pfeifer
parent b8377b8de5
commit e37448faaf
1 changed files with 6 additions and 4 deletions

View File

@ -161,10 +161,12 @@ if info(1) > 0
print_info(info, DynareOptions.noprint, DynareOptions)
end
if any(abs(DynareResults.steady_state(BayesInfo.mfys))>1e-9) && (DynareOptions.prefilter==1)
disp(['You are trying to estimate a model with a non zero steady state for the observed endogenous'])
disp(['variables using demeaned data!'])
error('You should change something in your mod file...')
if DynareOptions.prefilter==1
if (~DynareOptions.loglinear && any(abs(DynareResults.steady_state(BayesInfo.mfys))>1e-9)) || (DynareOptions.loglinear && any(abs(log(DynareResults.steady_state(BayesInfo.mfys)))>1e-9))
disp(['You are trying to estimate a model with a non zero steady state for the observed endogenous'])
disp(['variables using demeaned data!'])
error('You should change something in your mod file...')
end
end
if ~isequal(DynareOptions.mode_compute,11)