linearreg_res(A, alpha)
Returns a matrix such that the first column stores the values of array X and the second column stores the residuals after doing a linear regression analysis using the samples in X and Y.
See also linearreg linearreg_ana linearreg_ci_mea
Example
X=(3,4,6,6,7,8)
( 3 4 6 6 7 8 )
Y=(4,5,6,6,7,8)
( 4 5 6 6 7 8 )
h=linearreg_res(X,Y)
3.0 -1.33227E-15
4.0 0.25
6.0 -0.25
6.0 -0.25
7.0 8.88178E-16
8.0 0.25
plot(h, 1, 2, "noline", "circle:10:red")