s_tst_ttest_paired_core Subroutine

private pure subroutine s_tst_ttest_paired_core(x1, x2, t, df, p, h1)

The paired sample t-test (or dependent sample t-test). It is a special case of s_tst_ttest_1s offered and uses the same pure procedure (s_tst_ttest_1s_core).

Arguments

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

x1 vector (samples)

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

x2 vector (samples); must be same length as x1

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

test statistic

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

degrees of freedom

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

p-value

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

option: two (default), le, ge


Calls

proc~~s_tst_ttest_paired_core~~CallsGraph proc~s_tst_ttest_paired_core s_tst_ttest_paired_core proc~s_tst_ttest_1s_core s_tst_ttest_1s_core proc~s_tst_ttest_paired_core->proc~s_tst_ttest_1s_core proc~f_dst_t_cdf_core f_dst_t_cdf_core proc~s_tst_ttest_1s_core->proc~f_dst_t_cdf_core proc~f_sts_mean_core f_sts_mean_core proc~s_tst_ttest_1s_core->proc~f_sts_mean_core proc~f_dst_betai_core f_dst_betai_core proc~f_dst_t_cdf_core->proc~f_dst_betai_core

Called by

proc~~s_tst_ttest_paired_core~~CalledByGraph proc~s_tst_ttest_paired_core s_tst_ttest_paired_core proc~s_tst_ttest_paired s_tst_ttest_paired proc~s_tst_ttest_paired->proc~s_tst_ttest_paired_core interface~fsml_ttest_paired fsml_ttest_paired interface~fsml_ttest_paired->proc~s_tst_ttest_paired

Source Code

pure subroutine s_tst_ttest_paired_core(x1, x2, t, df, p, h1)

! ==== Description
!! The paired sample t-test (or dependent sample t-test).
!! It is a special case of `s_tst_ttest_1s` offered and uses
!! the same pure procedure (`s_tst_ttest_1s_core`).

! ==== Declarations
  real(wp)         , intent(in)  :: x1(:) !! x1 vector (samples)
  real(wp)         , intent(in)  :: x2(:) !! x2 vector (samples); must be same length as x1
  character(len=*) , intent(in)  :: h1    !! \( H_{1} \) option: two (default), le, ge
  real(wp)         , intent(out) :: t     !! test statistic
  real(wp)         , intent(out) :: df    !! degrees of freedom
  real(wp)         , intent(out) :: p     !! p-value

! ==== Instructions

  ! use procedure for 1-sample t-test on difference vector and set mu0 to 0
  call s_tst_ttest_1s_core( (x1 - x2), 0.0_wp, t, df, p, h1)

end subroutine s_tst_ttest_paired_core