How to calculate regression with dummy variables?
13 次查看(过去 30 天)
显示 更早的评论
Hi, I am trying to use 2nd degree polynomial regression with dummy variables. Which function should I use? Thanks for any help!
0 个评论
采纳的回答
the cyclist
2018-7-17
编辑:the cyclist
2018-7-17
2 个评论
the cyclist
2018-7-17
编辑:the cyclist
2018-7-17
Do you mean that you have polynomials for your independent variables, like
y = a + b*x + c*x^2
That is a linear model. "Linear" refers to the coefficients, not the powers (or whatever) of the variables.
On the other hand, something like
y = a + x^b
is nonlinear in the coefficient. Yes, you would need fitnlm for something like that.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!