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.ci(x) sign test data: x 95 percent confidence interval: Randomized confidence interval is mixture of two intervals probability lower end upper end 0.98985 0.2 1.5 0.01015 0.3 1.1 Corresponding fuzzy confidence interval is one on the narrower interval, 0.9899 elsewhere on the wider interval, and zero outside the wider interval, with values at jumps that are the average of the left and right limits > > x <- c(-1.2, -0.7, 0.2, 0.2, 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.ci(x) sign test data: x 95 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 0.2) 0.0000 {0.2} 0.1237 (0.2, 0.3) 0.9899 {0.3} 0.9949 (0.3, 1.1) 1.0000 {1.1} 0.9949 (1.1, 1.5) 0.9899 {1.5} 0.4949 (1.5, Inf) 0.0000 > > x <- c(-1.2, -0.7, 0.2, 0.2, 0.2, 0.2, 0.4, 0.9, 0.9, 1.0, 1.0, + 1.1, 1.5, 1.7, 1.9, 3.5, 5.1) > > fuzzy.sign.ci(x) sign test data: x 95 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 0.2) 0.0000 {0.2} 0.3100 (0.2, 1.1) 1.0000 {1.1} 0.9949 (1.1, 1.5) 0.9899 {1.5} 0.4949 (1.5, Inf) 0.0000 > > x <- c(-1.2, -0.7, -0.3, 0.1, 0.2, 0.3, 0.3, 0.3, 0.9, 1.0, 1.0, + 1.1, 1.5, 1.7, 1.9, 3.5, 5.1) > > fuzzy.sign.ci(x) sign test data: x 95 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 0.2) 0.0000 {0.2} 0.4949 (0.2, 0.3) 0.9899 {0.3} 0.9987 (0.3, 1.1) 1.0000 {1.1} 0.9949 (1.1, 1.5) 0.9899 {1.5} 0.4949 (1.5, Inf) 0.0000 > > x <- seq(1, 6) > > fuzzy.sign.ci(x) sign test data: x 95 percent confidence interval: Randomized confidence interval is mixture of two intervals probability lower end upper end 0.9 1 6 0.1 2 5 Corresponding fuzzy confidence interval is one on the narrower interval, 0.9 elsewhere on the wider interval, and zero outside the wider interval, with values at jumps that are the average of the left and right limits > > x <- seq(1, 4) > > fuzzy.sign.ci(x) sign test data: x 95 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 1) 0.6 {1} 0.8 (1, 4) 1.0 {4} 0.8 (4, Inf) 0.6 > > fuzzy.sign.ci(x, conf.level = 0.5) sign test data: x 50 percent confidence interval: Randomized confidence interval is mixture of two intervals probability lower end upper end 0.25 1 4 0.75 2 3 Corresponding fuzzy confidence interval is one on the narrower interval, 0.25 elsewhere on the wider interval, and zero outside the wider interval, with values at jumps that are the average of the left and right limits > > fuzzy.sign.ci(x, conf.level = 0.25) sign test data: x 25 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 2) 0.0000 {2} 0.3333 (2, 3) 0.6667 {3} 0.3333 (3, Inf) 0.0000 > > x <- seq(1, 5) > > fuzzy.sign.ci(x) sign test data: x 95 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 1) 0.2 {1} 0.6 (1, 5) 1.0 {5} 0.6 (5, Inf) 0.2 > > fuzzy.sign.ci(x, conf.level = 0.5) sign test data: x 50 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 2) 0.0 {2} 0.4 (2, 3) 0.8 {3} 0.8 (3, 4) 0.8 {4} 0.4 (4, Inf) 0.0 > > fuzzy.sign.ci(x, conf.level = 0.25) sign test data: x 25 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 2) 0.0 {2} 0.2 (2, 3) 0.4 {3} 0.4 (3, 4) 0.4 {4} 0.2 (4, Inf) 0.0 > > fuzzy.sign.ci(x, conf.level = 0.1) sign test data: x 10 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 2) 0.00 {2} 0.08 (2, 3) 0.16 {3} 0.16 (3, 4) 0.16 {4} 0.08 (4, Inf) 0.00 > > fuzzy.sign.ci(x, conf.level = 0.01) sign test data: x 1 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 2) 0.000 {2} 0.008 (2, 3) 0.016 {3} 0.016 (3, 4) 0.016 {4} 0.008 (4, Inf) 0.000 > > fuzzy.sign.ci(x, conf.level = 0.0) sign test data: x 0 percent confidence interval: Fuzzy confidence interval has membership function that is 0 everywhere > > fuzzy.sign.ci(x, conf.level = 1.0) sign test data: x 100 percent confidence interval: Fuzzy confidence interval has membership function that is 1 everywhere > > ##### one-sided ##### > > 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.ci(x, alt = "less") sign test data: x 95 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 1.1) 1.0000 {1.1} 0.7302 (1.1, 1.5) 0.4603 {1.5} 0.2302 (1.5, Inf) 0.0000 > > fuzzy.sign.ci(x, alt = "great") sign test data: x 95 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 0.2) 0.0000 {0.2} 0.2302 (0.2, 0.3) 0.4603 {0.3} 0.7302 (0.3, Inf) 1.0000 > > # as per request from Uwe Ligges (speaking for CRAN) comment this out > # because it gives a result that is hard to interpret > # on some computers but not on others (64 bit vs 32 bit) > # fuzzy.sign.ci(x, alt = "great", conf = 0.5) > > fuzzy.sign.ci(x, alt = "great", conf = 0.25) sign test data: x 25 percent confidence interval: Fuzzy confidence interval: set value (-Inf, 1) 0.0000 {1} 0.5325 (1, Inf) 1.0000 > > fuzzy.sign.ci(x, alt = "great", conf = 0) sign test data: x 0 percent confidence interval: Fuzzy confidence interval has membership function that is 0 everywhere > > fuzzy.sign.ci(x, alt = "great", conf = 1) sign test data: x 100 percent confidence interval: Fuzzy confidence interval has membership function that is 1 everywhere > > ##### example from paper ##### > > x <- c(3.13, 3.48, 3.50, 4.70, 4.76, 4.82, 5.28, 5.67, 5.82, 8.67) > > fuzzy.sign.ci(x) sign test data: x 95 percent confidence interval: Randomized confidence interval is mixture of two intervals probability lower end upper end 0.6756 3.48 5.82 0.3244 3.50 5.67 Corresponding fuzzy confidence interval is one on the narrower interval, 0.6756 elsewhere on the wider interval, and zero outside the wider interval, with values at jumps that are the average of the left and right limits > > > proc.time() user system elapsed 0.17 0.06 0.18