Binary Logistic Regression - beginner
396 ビュー (過去 30 日間)
古いコメントを表示
Hello,
Begginer question regarding logstic regressions in matlab. I am trying to run a binary logistic regression in Matlab but cannot seem to find the code to be able to do so. I am finding it for multinomial but not for binary. Could someone please lead me in the right direction?
I have a table of more than 60 variables and 200 000 rows that I want to run.
Thank you for your time and help!
0 件のコメント
採用された回答
the cyclist
2021 年 5 月 27 日
If you have the Statistics and Machine Learning Toolbox, you can use the fitglm function to fit a binomial logistic regression. See the first example on that page.
8 件のコメント
the cyclist
2021 年 5 月 29 日
If the variable is the log of assets, I'll wager that what has happened is that one of your asset values is unexpectedly negative. The log of a negative number is complex.
Take a look at the Name-Value Pair Arguments section of the fitglm documentation. There is a CategoricalVars input that allows you to specify which of your explanatory variables is categorical. Alternatively, you could convert the variable to categorical before entering it into the model.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!