R Under development (unstable) (2025-11-06 r88990 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > library(fuzzyRankTests) > > options(digits=5) # avoid rounding differences > > x <- c(-1.2, -0.7, -0.3, 0.1, 0.2, 0.3, 0.4, 0.9, 0.9, 1.0, 1.0, + 1.1, 1.5, 1.7, 1.9, 3.5, 5.1) > > fuzzy.sign.test(x, alternative = "greater") sign test data: x alternative hypothesis: true mu is greater than 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.001175 0 0.006363 1 > > x <- c(-1.2, -0.7, 0.0, 0.0, 0.0, 0.3, 0.4, 0.9, 0.9, 1.0, 1.0, + 1.1, 1.5, 1.7, 1.9, 3.5, 5.1) > > print(fuzzy.sign.test(x, alternative = "greater"), digits = 3) sign test data: x alternative hypothesis: true mu is greater than 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.000137 0.000 0.001175 0.125 0.006363 0.500 0.024521 0.875 0.071732 1.000 > > print(fuzzy.sign.test(- x, alternative = "less"), digits = 3) sign test data: -x alternative hypothesis: true mu is less than 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.000137 0.000 0.001175 0.125 0.006363 0.500 0.024521 0.875 0.071732 1.000 > > print(fuzzy.sign.test(x, alternative = "two.sided"), digits = 3) sign test data: x alternative hypothesis: true mu is not equal to 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.000275 0.000 0.002350 0.125 0.012726 0.500 0.049042 0.875 0.143463 1.000 > > x2 <- c(-1.2, -0.7, 0.0, 0.0, 0.0, 0.3, 0.4, 0.9, 0.9, 1.0) > > print(fuzzy.sign.test(x2, alternative = "two.sided"), digits = 3) sign test data: x2 alternative hypothesis: true mu is not equal to 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.0215 0.000 0.1094 0.125 0.3438 0.500 0.7539 0.875 1.0000 1.000 > > print(fuzzy.sign.test(- x2, alternative = "two.sided"), digits = 3) sign test data: -x2 alternative hypothesis: true mu is not equal to 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.0215 0.000 0.1094 0.125 0.3438 0.500 0.7539 0.875 1.0000 1.000 > > x <- c(-3.5, -2.3, -1.2, -0.7, 0.0, 0.0, 0.0, 0.0, 0.4, 0.9, 0.9, 1.0, 1.0, + 1.1, 1.9, 3.5, 5.1) > > print(fuzzy.sign.test(x, alternative = "two.sided"), digits = 3) sign test data: x alternative hypothesis: true mu is not equal to 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.0127 0.0000 0.0490 0.0625 0.1435 0.3125 0.3323 0.6875 0.6291 0.9375 1.0000 1.0000 > > x <- c(-4.1, -3.5, -2.3, -1.2, -0.7, 0.0, 0.0, 0.0, 0.0, 0.4, 0.9, 0.9, 1.0, + 1.1, 1.9, 3.5) > > print(fuzzy.sign.test(x, alternative = "two.sided"), digits = 3) sign test data: x alternative hypothesis: true mu is not equal to 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.0768 0.0000 0.2101 0.0625 0.4545 0.3125 0.8036 0.7500 1.0000 1.0000 > > x <- x[- length(x)] > > print(fuzzy.sign.test(x, alternative = "two.sided"), digits = 3) sign test data: x alternative hypothesis: true mu is not equal to 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.118 0.0000 0.302 0.0625 0.607 0.3750 1.000 1.0000 > > x <- seq(-2, 2) > > print(fuzzy.sign.test(x, alternative = "two.sided"), digits = 3) sign test data: x alternative hypothesis: true mu is not equal to 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.375 0 1.000 1 > > x <- x[x != 0] > > print(fuzzy.sign.test(x, alternative = "two.sided"), digits = 3) sign test data: x alternative hypothesis: true mu is not equal to 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.625 0 1.000 1 > > ##### now check with alpha ##### > > print(fuzzy.sign.test(x, alternative = "two.sided", alpha = 0.75), + digits = 3) sign test data: x alternative hypothesis: true mu is not equal to 0 randomized test rejects at level 0.75 with probability 0.333 > > x <- c(-1.2, -0.7, 0.0, 0.0, 0.0, 0.3, 0.4, 0.9, 0.9, 1.0, 1.0, + 1.1, 1.5, 1.7, 1.9, 3.5, 5.1) > > print(fuzzy.sign.test(x, alternative = "greater"), digits = 3) sign test data: x alternative hypothesis: true mu is greater than 0 fuzzy P-value has continuous, piecewise linear CDF with knots and values knots values 0.000137 0.000 0.001175 0.125 0.006363 0.500 0.024521 0.875 0.071732 1.000 > > print(fuzzy.sign.test(x, alternative = "greater", alpha = 0.10), + digits = 3) sign test data: x alternative hypothesis: true mu is greater than 0 randomized test rejects at level 0.1 with probability 1 > > print(fuzzy.sign.test(x, alternative = "greater", alpha = 0.05), + digits = 3) sign test data: x alternative hypothesis: true mu is greater than 0 randomized test rejects at level 0.05 with probability 0.942 > > print(fuzzy.sign.test(x, alternative = "greater", alpha = 0.01), + digits = 3) sign test data: x alternative hypothesis: true mu is greater than 0 randomized test rejects at level 0.01 with probability 0.575 > > print(fuzzy.sign.test(x, alternative = "greater", alpha = 0.001), + digits = 3) sign test data: x alternative hypothesis: true mu is greater than 0 randomized test rejects at level 0.001 with probability 0.104 > > print(fuzzy.sign.test(x, alternative = "greater", alpha = 0.0001), + digits = 3) sign test data: x alternative hypothesis: true mu is greater than 0 randomized test rejects at level 1e-04 with probability 0 > > > proc.time() user system elapsed 0.12 0.04 0.17