I have values for three different variables Z ,X,Y : how can i get the least square regression equation of Z on X and Y
6 次查看(过去 30 天)
显示 更早的评论
I have values for three different variables Z ,X,Y : how can i get the least square regression equation of Z on X and Y
0 个评论
回答(2 个)
the cyclist
2013-6-2
编辑:the cyclist
2013-6-2
You could use either the regress() function or the LinearModel.fit() function.
doc regress
or
doc LinearModel.fit
for details.
In each case, you'll need to combine your X and Y values into one array (predictor variables) and use Z for the response variable.
Image Analyst
2013-6-2
I use John D'Errico's polyfitn(): http://www.mathworks.com/matlabcentral/fileexchange/34765-polyfitn
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Descriptive Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!