bootstrap function parametric approach or non-parametric
조회 수: 8 (최근 30일)
이전 댓글 표시
I want to employ the bootstrap function in Matlab but I didn't find any explanation whether it is parametric bootstrapping or non-parametric!
댓글 수: 0
답변 (1개)
Aditya
2025년 3월 25일
Hi Ehsan,
In MATLAB, the bootstrp function is used for bootstrapping, and it primarily implements non-parametric bootstrapping. Non-parametric bootstrapping involves resampling with replacement from the observed data, which does not assume any specific parametric form for the data distribution.
Here's a simple example demonstrating how to use bootstrp in MATLAB:
% Sample data
data = randn(100, 1); % Example dataset
% Function to compute the statistic (e.g., mean)
statFun = @(x) mean(x);
% Perform bootstrap
nBootstraps = 1000; % Number of bootstrap samples
bootstat = bootstrp(nBootstraps, statFun, data);
% Display results
fprintf('Bootstrap mean: %.4f\n', mean(bootstat));
fprintf('Bootstrap standard deviation: %.4f\n', std(bootstat));
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!