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.
> 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.
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
You should not ignore my previous post.