I used "[b,dev.st​ats]=glmfi​t(b1,a1,'b​inomial')" function, and it has an error..

조회 수: 8 (최근 30일)
I used "[b,dev.stats]=glmfit(b1,a1,'binomial')" function, and it has an error..
a1 and b1 are 131472*1 matrix.
When I used "glmfit" function, it says errors like below..
Would you please help me ?
Error using glmfit (line 187)
Y must contain values in the interval [0,N] for the binomial distribution.
Error in Untitled7 (line 4)
[b,dev.stats]=glmfit(b1,a1,'binomial')

채택된 답변

the cyclist
the cyclist 2022년 12월 2일
You should carefully read and understand this section of the documentation for glmfit, which specifies what is expected for the second input to glmfit, when the distribution is binomial.
Quoting that section, y needs to be
"y is an n-by-1 vector indicating success or failure at each observation, or an n-by-2 matrix whose first column indicates the number of successes for each observation and second column indicates the number of trials for each observation"
It seems that you have not used one of those two conventions.

추가 답변 (0개)

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by