Errors in code in mh_optimal_bandwidth.m
Created by: spcatterall
It appears to me that there is an error in line 146 of mh_optimal_bandwidth.m:
g3 = abs(2*correction*k6(0)/(mu21*Itilda4*correction))^(1/9);
This line should be identical to line 113:
g3 = abs(2*correction*k6(0)/(mu21*Itilda4*number_of_draws))^(1/9);
Also, all references to 'n' in lines 135-152 should be replaced by 'number_of_draws'. [I've recently written code in R which performs the same function as mh_optimal_bandwidth.m and I've read the paper underpinning these methods. I came across this matlab code during a google search.]