Computes regression coefficient/slope.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x(:) |
x vector (assumed size array) |
||
| real(kind=wp), | intent(in) | :: | y(:) |
y vector (assumed size array) |
slope/regression slope
pure function f_sts_slope_core(x, y) result(slope) ! ==== Description !! Computes regression coefficient/slope. ! ==== Declarations real(wp), intent(in) :: x(:) !! x vector (assumed size array) real(wp), intent(in) :: y(:) !! y vector (assumed size array) real(wp) :: slope !! slope/regression slope ! ==== Instructions slope = f_sts_cov_core(x, y, 0.0_wp) / f_sts_var_core(x, 0.0_wp) end function f_sts_slope_core