How can i use dummyvar in fitlm

Hi I have database with 11 column inside with 10000 rows. when I have tried with numerical(year and mileage column ) it's giving me output(price) but when I am using text field ( make and model ) it is not giving me price ( Can I use dummy variable or dummy variable is just for numeric ?
c2=unique(X.Make) ?
d1=dummyvar(c2) ?
mdl=fitlm(X,Price~Make/c2)
.

Answers (1)

dpb
dpb on 18 Aug 2014
Edited: dpb on 18 Aug 2014
dummyvar can also use categorical variables as well as numeric grouping

Asked:

on 18 Aug 2014

Edited:

dpb
on 18 Aug 2014

Community Treasure Hunt

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

Start Hunting!