Change disp() to errors in var_sample_moments.m
Otherwise, the data moments that are required for estimating DSGE-VARs are set to an empty matrix instead of aborting. This will then lead to a cryptic crash in initial_estimation_checks.m due to matrix dimensions not agreeing.time-shift
parent
b3bcf37cca
commit
52e5b567eb
|
@ -78,7 +78,7 @@ XtX = [];
|
|||
data = read_variables(datafile,varobs,[],xls_sheet,xls_range);
|
||||
|
||||
if qlag > FirstObservation
|
||||
disp('VarSampleMoments :: not enough data to initialize! Try to increase FirstObservation.')
|
||||
error('VarSampleMoments :: not enough data to initialize! Try to increase FirstObservation.')
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -93,7 +93,7 @@ elseif var_trend_order == 1;% Constant and linear trend case.
|
|||
X = ones(NumberOfObservations,NumberOfVariables*qlag+2);
|
||||
indx = NumberOfVariables*qlag+1:NumberOfVariables*qlag+2;
|
||||
else
|
||||
disp('var_sample_moments :: trend must be equal to -1,0 or 1!')
|
||||
error('var_sample_moments :: trend must be equal to -1,0 or 1!')
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue