Extracting confidence interval data from fitdist()

I'm using fitdist() to fit a poisson distribution, which works great, but I'm having trouble locating the confidence interval within the created PoissonDistribution object. The confidence interval gets returned if you enter the distribution object in the command line, but as far as I can tell doesn't exist as a substructure within the distribution. I'm not sure how to extract the confidence interval if I don't know where it is stored. Thanks!
pd = fitdist(a','poisson');
pd =
Poisson distribution
lambda = 0.0166667 [0.000421963, 0.0928607]
pd.lambda
ans =
0.0167

 채택된 답변

Star Strider
Star Strider 2017년 12월 7일

2 개 추천

Use the paramci function:
pd_ci = paramci(pd)

댓글 수: 6

Works great, thanks! Seems obvious now that I know what I'm looking for hehe.
As always, my pleasure!
this doesnt work for poisson distrubutions anymore?
It seems to work —
data = poissrnd(42, 100, 1);
pd = fitdist(data,'poisson')
pd =
PoissonDistribution Poisson distribution lambda = 41.79 [40.523, 43.057]
pd_ci = paramci(pd)
pd_ci = 2×1
40.5230 43.0570
.
not for makedist, it gives the error regarding Dot indexing is not supported for variables of this type.
Post whatever problem you are having as a new question.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

질문:

2017년 12월 7일

댓글:

2022년 10월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by