Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

glmfit function

888 views
Skip to first unread message

cyd

unread,
Jul 20, 2009, 8:00:19 AM7/20/09
to
hi,

I am trying to do a logistic regression in matlab with the glmfit function but I got an error message which says

" B = glmfit(C, [Y ones(253,1)], 'binomial', 'link', 'logit')
Warning: X is ill conditioned, or the model is overparameterized, and
some coefficients are not identifiable. You should use caution
in making predictions.
> In glmfit at 237
Warning: Iteration limit reached. "

What should I do fot the iteration limit problem ?

Is there any other method to do a logistic regression except glmfit function ?

By the way both my response and predictors are binary variables.

Peter Perkins

unread,
Jul 20, 2009, 12:12:14 PM7/20/09
to
cyd wrote:

> I am trying to do a logistic regression in matlab with the glmfit function but I got an error message which says
>
> " B = glmfit(C, [Y ones(253,1)], 'binomial', 'link', 'logit')
> Warning: X is ill conditioned, or the model is overparameterized, and
> some coefficients are not identifiable. You should use caution
> in making predictions.
>> In glmfit at 237
> Warning: Iteration limit reached. "
>
> What should I do fot the iteration limit problem ?

You should solve the underlying problem. The warning message is telling you tht you've asked to fit a model that is inherently not estimable. This may be due to one of three things:

1) you included a column of ones in the design matrix X. The help cautions against doing that.
2) you may have too few observations for the number of parameters you're trying to estimate. That's a statistical issue, not a software issue. If this is the case, you cannot expect to get useful estimates. Simplify your model, or collect more data.
3) you may have two predictor variables, or sets of variables, that are close to perfectly correlated. Again, a statistical issue. Remove the redundant variables.

Hope this helps.

cyd

unread,
Jul 21, 2009, 5:27:02 PM7/21/09
to
Peter Perkins <Peter....@MathRemoveThisWorks.com> wrote in message <h4250u$cku$1...@fred.mathworks.com>...


many thanks for your reply.

I handle the iteration limit problem but now I get an another warning message which says " Warning: X is ill conditioned, or the model is overparameterized, and


some coefficients are not identifiable. You should use caution

in making predictions." What is the reason of this message How can I fix the problem ?

sincerely,

cyd

Peter Perkins

unread,
Jul 21, 2009, 7:00:24 PM7/21/09
to

You should not ignore my previous post.

0 new messages