I am trying to use logistic regression, but when i execute the following line of code
betaHatNorm=mnrfit(data,class);
my betaHatNorm contains mostly Nan, any resaon it might do so? it also throws a warning regarding matrix
Warning: Matrix is singular to working precision.

 Respuesta aceptada

Peter Perkins
Peter Perkins el 11 de Jun. de 2012

0 votos

What most people mean by "logistic tregression" is a binomial response: number of "successes" vs. number of "failures". Unless you specifically need to fit a model for a multinomial response (more than just two response categories), I'd suggest you use glmfit.

3 comentarios

Nirmal
Nirmal el 13 de Jun. de 2012
Thank you for the response. What is the reason for using glmfit?
Peter Perkins
Peter Perkins el 13 de Jun. de 2012
"Unless you specifically need to fit a model for a multinomial response ..." mnrfit is both more and less general than glmfit, but it is simpler to use glmfit for (binomial) logistic regression.
Runcong Kuang
Runcong Kuang el 23 de Ag. de 2022
I am doing multinomial response using mnrfit.
I am getting the same warning.
How can I fix this?
Thanks.

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 8 de Jun. de 2012

Comentada:

el 23 de Ag. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by