Why does stepwiselm function output NaN with model interactions?
4 ビュー (過去 30 日間)
古いコメントを表示
I was doing stepwise regression and implementing stepwiselm in commant line mdl = stepwiselm(tbl,'interactions'). My dimension of the table was quite big.It's 16 by 88. So there's 87 variable. I put variables in 1 to 87th coulmn and the result is in 88th column. But All the output is comiing NaN. I am not understading why is this happening. The output is comming out one by one but no value.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/298883/image.jpeg)
0 件のコメント
回答 (1 件)
Jeff Miller
2020 年 5 月 24 日
Multivariate techniques like stepwise regression require more cases (rows) than variables--in practice, you need at least 5-10 times as many. Sounds like you have 16 cases and 88 variables, so you unfortunately can't come close to using stepwise. As far as I know, pretty much your only realistic option is look at the 87 predictors one at a time with a univariate regression or correlation. Just be aware that this approach may well tell you--by chance--that some predictors are significant even when they really are not.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!