s_tst_anova_1w Subroutine

public impure subroutine s_tst_anova_1w(x, f, df_b, df_w, p)

Impure wrapper procedure for s_tst_anova_1w_core.

Arguments

Type IntentOptional 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


Calls

proc~~s_tst_anova_1w~~CallsGraph proc~s_tst_anova_1w s_tst_anova_1w proc~s_err_print s_err_print proc~s_tst_anova_1w->proc~s_err_print proc~s_tst_anova_1w_core s_tst_anova_1w_core proc~s_tst_anova_1w->proc~s_tst_anova_1w_core proc~f_utl_r2c f_utl_r2c proc~s_err_print->proc~f_utl_r2c proc~f_dst_f_cdf_core f_dst_f_cdf_core proc~s_tst_anova_1w_core->proc~f_dst_f_cdf_core proc~f_sts_mean_core f_sts_mean_core proc~s_tst_anova_1w_core->proc~f_sts_mean_core proc~f_dst_betai_core f_dst_betai_core proc~f_dst_f_cdf_core->proc~f_dst_betai_core

Called by

proc~~s_tst_anova_1w~~CalledByGraph proc~s_tst_anova_1w s_tst_anova_1w interface~fsml_anova_1way fsml_anova_1way interface~fsml_anova_1way->proc~s_tst_anova_1w

Source Code

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 sentinel value if invalid
     call s_err_print(fsml_error(4))
     f    = c_sentinel_r
     p    = c_sentinel_r
     df_b = c_sentinel_r
     df_w = c_sentinel_r
     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