MATLAB Answers

Does mnrfit and glmfit allow univariable regression? and how to interpret the results of regression from these functions?

9 views (last 30 days)
Harshan Ravi
Harshan Ravi on 29 Sep 2020
Answered: Puru Kathuria on 28 Oct 2020
Hi All,
I am new to regression analysis for categorical data. I have 120 independent variable and 1 dependent categorical variable. I would like to perform univariable regression analysis on each of these 120 independent variables with the categorical dependent variable. I would like to shortlist few improtant features based on the p value from their univariable regression analysis. After searching online I found out about logistic regression as away to do regression analysis on categorical data. I found 2 commands in matlab mnrfit and fitglm with bionmial distribution. However, I am not sure if its okay to use them for univariable regression analysis or how to interpret the results from these functions. Can any provide me with proper explanation? if possible with an example.
Regards
Harshan

Answers (1)

Puru Kathuria
Puru Kathuria on 28 Oct 2020
Hi,
You can use any of the mentioned models depending upon your requirements. Generally, logistic regression has a binary outcome or the dependent variable is binary, but you can also have multivariate logistic regression depending upon your dataset. Here is the link of an example that illustrates the workflow of generalized linear model and this is the link of an example that shows how to fit and evaluate generalized linear models.
Also, refer this for multinomial logistic regression.
I hope this gives you a perspective to solve your problem.

Community Treasure Hunt

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

Start Hunting!