Bootstrapped Confidence Intervals controlling for multiple hypothesis testing ?
11 次查看(过去 30 天)
显示 更早的评论
I have another question related to bootstrapped confidence intervals.
I'm currently interested in comparing differences in means of two variables using bootstrapped confidence intervals. However, I'm unsure whether and how to control for multiple hypothesis testing when computing these intervals.
I need to calculate the pvalue first, right? And then adjust these raw pvalues for multiple hypothesis testing? Any guidance on this? Thank you
n = 1000; % Number of data points
rng(42); % Set seed for reproducibility
x1 = randn(n, 1); % Random data for group 1
x2 = randn(n, 1); % Random data for group 2
% Function to compute the difference of means
boot_func = @(x1, x2) mean(x1) - mean(x2);
% Bootstrap resampling and calculation of confidence intervals
boot_samples = 10000; % Number of bootstrap samples
boot_ci = bootci(boot_samples, {boot_func, x1, x2}, 'type', 'per');
% Multiple Hypothesis testing?
% Bonferroni, Holm, Step Down?
The following function calculates p-values for the bca method, but not for the 'perc' method in bootci.
1 个评论
the cyclist
2024-3-2
I think your simple example here may be too simple to illustrate your question.
You only have two variables, and you are only calculating one difference of means. You don't seem to have multiple comparisons here, so there is no need to account for the testing of multiple hypotheses. (You seem to have one hypothesis: The difference in means is greater than one would see by chance, under the null hypothesis.)
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Hypothesis Tests 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!