How to integrate discrete variable in general linear regression model ?

We have a data base of 18 continuous variables, 2 discrete variables and one dependant variable Y. We were able to build a linear model based only on the continuous variables using functions like regress() and stepwise()! But we need to integrate the two discrete variables in the model! Is there a method or function on matlab or statistics toolbox that we can use to do such a task??
Y is a 310*1 matrix and so are all the other variables!
Thank you!

回答 (1 件)

Fernando Echeverria
Fernando Echeverria 2018 年 11 月 13 日

0 投票

I would suggest logistic regression for regression involving discrete variables. Or decission trees such as Fast and Frugal Trees

カテゴリ

質問済み:

2012 年 7 月 18 日

回答済み:

2018 年 11 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by