fsml_ranksum Interface

public interface fsml_ranksum

The ranks sum test (Wilcoxon rank-sum test or Mann–Whitney U test) is a non-parametric test to determine if two independent samples and are have the same distribution. It can be regarded as the non-parametric equivalent of the 2-sample t-test.

Hypotheses:

The null hypothesis and alternative hypothesis can be written as: : the distributions of and are equal. : the distributions of and are not equal.

Procedure:

The Mann–Whitney U statistic is calculated for each sample as follows: where is the sum of ranks of sample set and is the sample size of sample set . The final U statistic is:

The procedure takes into consideration tied ranks.

Calls

interface~~fsml_ranksum~~CallsGraph interface~fsml_ranksum fsml_ranksum proc~s_tst_ranksum s_tst_ranksum interface~fsml_ranksum->proc~s_tst_ranksum proc~s_err_print s_err_print proc~s_tst_ranksum->proc~s_err_print proc~s_tst_ranksum_core s_tst_ranksum_core proc~s_tst_ranksum->proc~s_tst_ranksum_core proc~f_utl_r2c f_utl_r2c proc~s_err_print->proc~f_utl_r2c proc~f_dst_norm_cdf_core f_dst_norm_cdf_core proc~s_tst_ranksum_core->proc~f_dst_norm_cdf_core proc~s_utl_rank s_utl_rank proc~s_tst_ranksum_core->proc~s_utl_rank

Module Procedures

public impure subroutine s_tst_ranksum(x1, x2, u, p, h1)

Impure wrapper procedure for s_tst_ranksum_core.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x1(:)

x1 vector (samples)

real(kind=wp), intent(in) :: x2(:)

x2 vector (samples)

real(kind=wp), intent(out) :: u

U statistic

real(kind=wp), intent(out) :: p

p-value

character(len=*), intent(in), optional :: h1

option: "two" (default), "lt", or "gt"