Allow non-integer values for hp_filter parameter

time-shift
Sébastien Villemot 2011-09-08 17:29:49 +02:00
parent ef26fe0034
commit 1b4dcdd7f1
5 changed files with 11 additions and 11 deletions

View File

@ -2828,8 +2828,8 @@ Order of autocorrelation coefficients to compute and to print. Default: @code{5}
Number of points dropped at the beginning of simulation before
computing the summary statistics. Default: @code{100}.
@item hp_filter = @var{INTEGER}
Uses HP filter with @math{\lambda} = @var{INTEGER} before computing
@item hp_filter = @var{DOUBLE}
Uses HP filter with @math{\lambda} = @var{DOUBLE} before computing
moments. Default: no filter.
@item hp_ngrid = @var{INTEGER}

View File

@ -60,7 +60,7 @@ if options_.nomoments == 0
title='MOMENTS OF SIMULATED VARIABLES';
if options_.hp_filter
title = [title ' (HP filter, lambda = ' ...
int2str(options_.hp_filter) ')'];
num2str(options_.hp_filter) ')'];
end
headers=char('VARIABLE','MEAN','STD. DEV.','VARIANCE','SKEWNESS', ...
'KURTOSIS');
@ -73,7 +73,7 @@ if options_.nocorr == 0
title = 'CORRELATION OF SIMULATED VARIABLES';
if options_.hp_filter
title = [title ' (HP filter, lambda = ' ...
int2str(options_.hp_filter) ')'];
num2str(options_.hp_filter) ')'];
end
headers = char('VARIABLE',M_.endo_names(ivar,:));
dyntable(title,headers,labels,corr,size(labels,2)+2,8,4);
@ -93,7 +93,7 @@ if ar > 0
title = 'AUTOCORRELATION OF SIMULATED VARIABLES';
if options_.hp_filter
title = [title ' (HP filter, lambda = ' ...
int2str(options_.hp_filter) ')'];
num2str(options_.hp_filter) ')'];
end
headers = char('VARIABLE',int2str([1:ar]'));
dyntable(title,headers,labels,autocorr,size(labels,2)+2,8,4);

View File

@ -53,7 +53,7 @@ oo_.var = oo_.gamma_y{1};
if ~options_.noprint %options_.nomoments == 0
title='THEORETICAL MOMENTS';
if options_.hp_filter
title = [title ' (HP filter, lambda = ' int2str(options_.hp_filter) ')'];
title = [title ' (HP filter, lambda = ' num2str(options_.hp_filter) ')'];
end
headers=char('VARIABLE','MEAN','STD. DEV.','VARIANCE');
labels = deblank(M_.endo_names(ivar,:));
@ -64,7 +64,7 @@ if ~options_.noprint %options_.nomoments == 0
title='VARIANCE DECOMPOSITION (in percent)';
if options_.hp_filter
title = [title ' (HP filter, lambda = ' ...
int2str(options_.hp_filter) ')'];
num2str(options_.hp_filter) ')'];
end
headers = M_.exo_names;
headers(M_.exo_names_orig_ord,:) = headers;
@ -95,7 +95,7 @@ if options_.nocorr == 0 && size(stationary_vars, 1) > 0
disp(' ')
title='MATRIX OF CORRELATIONS';
if options_.hp_filter
title = [title ' (HP filter, lambda = ' int2str(options_.hp_filter) ')'];
title = [title ' (HP filter, lambda = ' num2str(options_.hp_filter) ')'];
end
labels = deblank(M_.endo_names(ivar(i1),:));
headers = char('Variables',labels);
@ -113,7 +113,7 @@ if options_.ar > 0 && size(stationary_vars, 1) > 0
disp(' ')
title='COEFFICIENTS OF AUTOCORRELATION';
if options_.hp_filter
title = [title ' (HP filter, lambda = ' int2str(options_.hp_filter) ')'];
title = [title ' (HP filter, lambda = ' num2str(options_.hp_filter) ')'];
end
labels = deblank(M_.endo_names(ivar(i1),:));
headers = char('Order ',int2str([1:options_.ar]'));

View File

@ -3,7 +3,7 @@ function [hptrend,hpcycle] = sample_hp_filter(y,s)
%
% INPUTS
% y [double] T*n matrix of data (n is the number of variables)
% s [integer] scalar, smoothing parameter.
% s [double] scalar, smoothing parameter.
%
% OUTPUTS
% hptrend [double] T*n matrix, trend component of y.

View File

@ -1833,7 +1833,7 @@ o_nofunctions : NOFUNCTIONS { driver.option_num("nofunctions", "1"); };
o_nomoments : NOMOMENTS { driver.option_num("nomoments", "1"); };
o_irf : IRF EQUAL INT_NUMBER { driver.option_num("irf", $3); };
o_irf_shocks : IRF_SHOCKS EQUAL '(' symbol_list ')' { driver.option_symbol_list("irf_shocks"); };
o_hp_filter : HP_FILTER EQUAL INT_NUMBER { driver.option_num("hp_filter", $3); };
o_hp_filter : HP_FILTER EQUAL non_negative_number { driver.option_num("hp_filter", $3); };
o_hp_ngrid : HP_NGRID EQUAL INT_NUMBER { driver.option_num("hp_ngrid", $3); };
o_periods : PERIODS EQUAL INT_NUMBER { driver.option_num("periods", $3); };
o_cutoff : CUTOFF EQUAL non_negative_number { driver.cutoff($3); }