making sure variance of subsample is not very small before computing kernel density

time-shift
Michel Juillard 2011-03-28 09:16:39 +02:00
parent e29aeeadd8
commit 2882827084
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ post_deciles = xx([round(0.1*number_of_draws) ...
density = [];
if info
number_of_grid_points = 2^9; % 2^9 = 512 !... Must be a power of two.
if post_var > 0
if post_var > 1e-12
bandwidth = 0; % Rule of thumb optimal bandwidth parameter.
kernel_function = 'gaussian'; % Gaussian kernel for Fast Fourrier Transform approximaton.
optimal_bandwidth = mh_optimal_bandwidth(xx,number_of_draws,bandwidth,kernel_function);