Confidence intervals, logistic regression

13 visualizzazioni (ultimi 30 giorni)
Elizabeth Vieira
Elizabeth Vieira il 18 Mar 2016
Deal all,
I am using logistic regression to fit my data. In the end I want a prevision with confidence intervals.
I am using the code that follows:
CVO = cvpartition(y2,'k',10);
C=zeros(96,3);
for i = 1:CVO.NumTestSets
trIdx = CVO.training(i);
teIdx = CVO.test(i);
mdl = fitglm(x1(trIdx, :),y2(trIdx, :),'linear','Distribution','binomial','Link','logit')
[score, yci] = predict(mdl,x1(teIdx, :));
C(teIdx)=score;
C(teIdx, 2)=yci(:,1);
C(teIdx, 3)=yci(:,2);
For each observation I obtain the probability and confidence intervals (95%) that are not simetric around the mean prevision. How are these confidence intervals determined by MatLabR2014a?
Thanks in advance.
Best,
Elizabeth Vieira

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by