Permutation test using SD
permu_test_SD_cpp(x, x_sd, y, y_sd, alt_code, standard_convention)A list with the statistic, p.value and total.
x <- c(20, 33, 20, 24)
x_sd <- c(2, 2, 2, 2)
y <- c(21, 34, 22, 25)
y_sd <- c(2, 2, 2, 2)
# Using the test in cpp
permu_test_SD_cpp(x, x_sd, y, y_sd,
alt_code=2, standard_convention=FALSE)
#> $statistic
#> [1] 5.549242
#>
#> $p.value
#> [1] 0.1874809
#>
#> $total
#> [1] 104976
#>
# Using the test in R
permu_test_SD(x, x_sd, y, y_sd, alternative="less")
#>
#> Paired permutation test with SD
#>
#> data:
#> Percentage_difference = 5.5492, p-value = 0.1875
#> alternative hypothesis: less
#>