Effacer les filtres
Effacer les filtres

how to find confidence interval for not normally distributed data

7 vues (au cours des 30 derniers jours)
shagun chaudhary
shagun chaudhary le 23 Sep 2021
hi,
I wanted to find 95% confidence interval for not normally distributed but I am getting error 'BOOTFUN returns a NaN or Inf'. I dont whats the problem. Please if somebody can help me on this. I have posted code and also attcahed by data.
dData=[R.X1]';
ci = bootci(1000, {@mean, dData}, 'type', 'per', 'alpha', .95)
Error using bootci (line 152)
BOOTFUN returns a NaN or Inf.

Réponses (1)

Jaynik
Jaynik le 8 Mar 2024
Hi Shagun,
I tried reproducing the issue in MATLAB R2023a but the code works without any error. The problem you're encountering might be due to an older release of MATLAB. Please update MATLAB and try again.
Also, the 'alpha', .95 part in your code is incorrect if you're trying to set the confidence level to 95%. The alpha parameter should be set to the significance level which would be 0.05. Hence, the line would become:
ci = bootci(1000, {@mean, dData}, 'type', 'per', 'alpha', .05);

Community Treasure Hunt

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

Start Hunting!

Translated by