Help with MATLAB bootci function.
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi All,
I have some data that is heavily skewed towards the right (see below). This data consists of range values from subsets of a greater data set.
I am trying to use 'bootci' to find confidence intervals but I am having issues with the 'bootfun' input.
I have tried a number of options including @mean, @range, @std as well as a number of formulas, however the resulting confidence intervals are way off (very low and narrow).
Information in other community questions have not been able to help, although this page got close - https://comp.soft-sys.matlab.narkive.com/txMFOYpl/can-anyone-tell-me-how-to-use-the-bootci-function.
What exactly is the bootfun input and how can I apply it in a way that will yeild a 95% confidence interval of the skewed data?
Thanks in advance!
0 comentarios
Respuestas (1)
Ayush Modi
el 22 de Feb. de 2024
Hi Nicholas,
The "bootfun" input parameter in the "bootci" function is a handle to a function that computes the statistic of interest from the resampled data. With skewed data, using the mean as the statistic might not always be appropriate because the mean is sensitive to outliers and skewness. Instead, you might consider trimmed mean using "trimmean" function or custom statistics function, which can give a better central tendency measure for skewed distributions.
Here is an example how you can use custom function handle in "bootci" function:
ci = bootci(nboot, @(data) customFunction(data), data);
Please refer to the following MathWorks documentation for more information on the "bootci" function:
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!