I used "[b,dev.stats]=glmfit(b1,a1,'binomial')" function, and it has an error..
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Chris
el 2 de Dic. de 2022
Respondida: the cyclist
el 2 de Dic. de 2022
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')
0 comentarios
Respuesta aceptada
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.
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!