How can i use dummyvar in fitlm
Show older comments
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)
dummyvar can also use categorical variables as well as numeric grouping
Categories
Find more on Analysis of Variance and Covariance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!