MATLAB: How to calculate regression with dumthe variables

MATLAB

Hi, I am trying to use 2nd degree polynomial regression with dummy variables. Which function should I use? Thanks for any help!

Best Answer

If you have the Statistics and Machine Learning Toolbox, take a look at the fitlm function.
You might also find the dummyvar command useful for creating dummy variables.
Take a look at Regression with Categorical Covariates for an example.
Related Question