This subroutine computes the regression line for a data set of x, y variables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pr), | intent(in), | allocatable | :: | x(:) |
x: input array of length n which contains the set of independent variable |
|
real(kind=pr), | intent(in), | allocatable | :: | y(:) |
y: input array of length n which contains the set of dependent variable |
|
real(kind=pr), | intent(out) | :: | a |
a: output real variable. Slope of the regression line |
||
real(kind=pr), | intent(out) | :: | b |
b: output real variable. Intercept of the regression line |
||
real(kind=pr), | intent(out) | :: | r2 |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=pr), | public | :: | aux1 | ||||
real(kind=pr), | public | :: | aux2 | ||||
real(kind=pr), | public | :: | aux3 | ||||
real(kind=pr), | public | :: | aux4 | ||||
real(kind=pr), | public | :: | aux5 | ||||
integer, | public | :: | i | ||||
integer, | public | :: | n |
total number of data set. |
|||
real(kind=pr), | public | :: | t1 | ||||
real(kind=pr), | public | :: | t2 | ||||
real(kind=pr), | public | :: | t3 | ||||
real(kind=pr), | public | :: | t4 |