MATLAB: Logistic regression

logistic regressionnanregressionsingular to working precision

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.

Best Answer

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.