How can i include error calculation in the linear regression in a for loop?
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I have two arrays X(150,3) and Y(150,3). does any one know how to calculate regression for each row including uncertainity in the slop?
I tried
for i=1:length(X)
b_err(i,:) = sqrt(diag((bint(i,:).R)\inv(bint(i,:).R'))./bint(i,:).normr.^2./bint(i,:).df);
end;
but b_err give unrealstic values.
Thank you all,
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!