Computes regression coefficient/trend.
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) |
trend/regression slope
pure function f_sts_trend_core(x, y) result(trend) ! ==== Description !! Computes regression coefficient/trend. ! ==== Declarations real(wp), intent(in) :: x(:) !! x vector (assumed size array) real(wp), intent(in) :: y(:) !! y vector (assumed size array) real(wp) :: trend !! trend/regression slope ! ==== Instructions trend = f_sts_cov_core(x, y, 0.0_wp) / f_sts_var_core(x, 0.0_wp) end function f_sts_trend_core