フィルターのクリア

Is it possible to set up multinomial logistic regression with multiple ordinal predictors?

5 ビュー (過去 30 日間)
Prasad
Prasad 2017 年 10 月 19 日
コメント済み: Benjamin 2024 年 2 月 19 日
I am trying to generate a regression model that takes in 9 ordinal inputs(X) and returns 1 ordinal output (Y).
If I treat my X matrix of predictors like they are continuous (all ranging in integer values from 0 to 3, some only from 0 to 2), the model has relatively large coefficients (e.g. -1.68e15), or it just errors out with the following output:
Index exceeds matrix dimensions.
Error in mnrfit>ordinalFit (line 380)
pi = [gam(:,1) diffgam 1-gam(:,k-1)];
Error in mnrfit (line 206)
ordinalFit(x,z,m,pi,flink,ilink,dlink,n,k,p,pstar,parallel);
Error in GroomingOntomFLS_multiNomOrdRegress (line 51)
val = mnrfit( dataMatrix, responseVec, 'model', 'ordinal');
Each column of my `dataMatrix` variable is a separate, ordinal predictor. Is it possible to define them explicitly as ordinal variables?

回答 (1 件)

Corey Silva
Corey Silva 2017 年 10 月 24 日
This definitely should be possible but hard without seeing your inputs. I think the following example should help you out: https://www.mathworks.com/help/stats/mnrfit.html#btpyj65
  1 件のコメント
Benjamin
Benjamin 2024 年 2 月 19 日
Unfortunately, this works only with an ordinal response, not with ordinal predictors.

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

Community Treasure Hunt

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

Start Hunting!

Translated by