how to find confidence interval for not normally distributed data
조회 수: 3 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Jaynik
2024년 3월 8일
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);
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!