logistic regression

조회 수: 2 (최근 30일)
Nirmal
Nirmal 2012년 6월 8일
댓글: Runcong Kuang 2022년 8월 23일
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.

채택된 답변

Peter Perkins
Peter Perkins 2012년 6월 11일
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
Peter Perkins
Peter Perkins 2012년 6월 13일
"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 2022년 8월 23일
I am doing multinomial response using mnrfit.
I am getting the same warning.
How can I fix this?
Thanks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by