why my kernel density function never touches x axes?
古いコメントを表示
Hello:
I want plot kernel density function with the attached test data. I have used foll. code:
Xgrid1 = linspace(min(X),max(X),1000);
pdfEst_1 = ksdensity(X,Xgrid1,'function','pdf');
plot(Xgrid1,pdfEst_1,'Color','B','linew',1.8);
However, the generated density function never touches the x-axes & always moves up, without any closed bounds. Any possible ways that the generated PDFs touches x - axes?
4 件のコメント
the cyclist
2021 年 1 月 28 日
Can you upload a file with H_10?
Poulomi Ganguli
2021 年 1 月 28 日
the cyclist
2021 年 1 月 28 日
Is that what is in the file Test1? Just those 15 data points?
It will depend on the kernel you choose, but the estimated density will be zero (or approach zero) as you move away from where the function has support. You haven't defined any grid points that are far away from where X has support.
Poulomi Ganguli
2021 年 1 月 28 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Kernel Distribution についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
