run glmfit , why get Warning: X is ill conditioned, or the model is overparameterized

21 ビュー (過去 30 日間)
Jie Li
Jie Li 2021 年 8 月 19 日
回答済み: Jeff Miller 2021 年 8 月 20 日
run code for a linear regrssion. X has 5 predictors, Y is one response vector with ordinal values(1 to 5)
b = glmfit(X,Y);
Warning: X is ill conditioned, or the model is overparameterized, and some coefficients are not identifiable. You should use caution in making predictions.
similarly when running b = mnrfit(X, Y);
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 4.607712e-20.
Does anyone know the reason, how to fix the issue?
  3 件のコメント
Jie Li
Jie Li 2021 年 8 月 19 日
Thank you for looking at my problem. x, y data in the attached csv file.

サインインしてコメントする。

採用された回答

Jeff Miller
Jeff Miller 2021 年 8 月 20 日
The problem is that the x1-x5 values sum to 24 in every row. This means that any one of the x's can be predicted from the rest of the x's, which is not allowed in regression models. I suggest you drop one of the x's from the predictor set.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by