フィルターのクリア

Plug-in approach of Sheater and Jones estimation bandwidth

10 ビュー (過去 30 日間)
Maximiliano Barbosa
Maximiliano Barbosa 2022 年 10 月 4 日
回答済み: Ayush Anand 2023 年 10 月 20 日
Hi, there is some algorithm that has the "Plug-in approach of Sheater and Jones estimation bandwidth 1991" instead using the "optimal bandwidth for the normal distribution" . I ask that because my data is bimodal distribution and I need estimate the bandwidth of the kernel estimated with the Sheater and Jones method.
Furthermore, the MATLAB [f,xi] = ksdensity(x) function says:
" The default is optimal for estimating normal densities [1], but you might want to choose a larger or smaller value to smooth more or less "
I have MATLAB 2020B, and there some toolbox wich could help me?
Thank you in advance

回答 (1 件)

Ayush Anand
Ayush Anand 2023 年 10 月 20 日
Hi Maximiliano,
I understand you are trying to estimate the bandiwidth of your data kernal using the Sheater and Jones method. The "ksdensity" function in MATLAB does not directly provide an option for the same, but you can do it by specifying a custom bandwidth as follows:
data = ... % your bimodal data
% Estimate the bandwidth using the Sheather and Jones plug-in approach
n = numel(data);
h_sj = 1.06 * std(data) * n^(-1/5); % Sheather and Jones bandwidth estimation
[f, xi] = ksdensity(data, 'Bandwidth', h_sj); % Estimate the kernel density using the estimated bandwidth
Alternatively, you can also refer to the following:
I hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by