Impure wrapper procedure for s_tst_anova_1w_core.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x(:,:) |
2D array, each column is a group |
||
| real(kind=wp), | intent(out) | :: | f |
F-statistic |
||
| real(kind=wp), | intent(out) | :: | df_b |
degrees of freedom between groups |
||
| real(kind=wp), | intent(out) | :: | df_w |
degrees of freedom within groups |
||
| real(kind=wp), | intent(out) | :: | p |
p-value from F distribution |
impure subroutine s_tst_anova_1w(x, f, df_b, df_w, p) ! ==== Description !! Impure wrapper procedure for `s_tst_anova_1w_core`. ! ==== Declarations real(wp), intent(in) :: x(:,:) !! 2D array, each column is a group real(wp), intent(out) :: f !! F-statistic real(wp), intent(out) :: p !! p-value from F distribution real(wp), intent(out) :: df_b !! degrees of freedom between groups real(wp), intent(out) :: df_w !! degrees of freedom within groups ! ==== Instructions ! ---- handle input ! check that no. of elements and groups (must both be 2 or higher) if (size(x, 1) .le. 1 .or. size(x, 2) .le. 1) then ! write error message and assign NaN value if invalid call s_err_print(fsml_error(4)) f = f_utl_assign_nan() p = f_utl_assign_nan() df_b = f_utl_assign_nan() df_w = f_utl_assign_nan() return endif ! ---- conduct test ! call pure procedure call s_tst_anova_1w_core(x, f, df_b, df_w, p) end subroutine s_tst_anova_1w