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

13 visualizaciones (últimos 30 días)
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')

Respuesta aceptada

the cyclist
the cyclist el 2 de Dic. de 2022
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.

Más respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by