reference dummy coding with Matlab fitlme
显示 更早的评论
Thanks in advance for the help
I have a set of data that is composed of multiple categorical predictors and a single numerical response. I want to use regression to predict the response. Matlab automatically recognizes categorical data and uses dummy coding to remove the rank and magnitude that is associated with numeric predictors.
Here is my question. Suppose I have a predictor with categories 0, 1, and 2. I want to be able to specify which of the three categories is the reference (I want to use reference dummy coding as opposed to effects or full). Is there a way to do this? In particular I am using fitlme. The docs say that the first category is set to zero when using reference dummy coding. In my case does this mean that 0 would be the reference variable or is the first category that matlab sees in my dataset set as the reference variable? In other words, what does 'the first category' mean?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Regression 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!