MultiStatisticEpistemicTest {FuzzySimRes} | R Documentation |
Apply multi-statistic epistemic test for one or two fuzzy samples.
Description
'MultiStatisticEpistemicTest' calculates the p-value for the given real-valued statistical test using the multi-statistic epistemic bootstrap approach.
Usage
MultiStatisticEpistemicTest(
sample1,
sample2,
bootstrapMethod = "std",
test = "ks.test",
cutsNumber = 1,
combineMethod = "simes",
...
)
Arguments
sample1 |
Sample of fuzzy numbers given in the form of a list or as a single number. |
sample2 |
Sample of fuzzy numbers given in the form of a list or as a single number (two-sample test case) or
|
bootstrapMethod |
The standard ( |
test |
Name of the invoked function for the statistical test. |
cutsNumber |
Number of cuts used in the epistemic bootstrap. |
combineMethod |
Name of the method used to combine the multiple p-values to provide the single output. |
... |
Additional arguments passed to the statistical test. |
Details
The procedure calculates the p-value for the selected real-valued statistical test, like, e.g. the Kolmogorov-Smirnov
one- or two-sample test (invoked by ks.test
function). Another statistical test can be also used if it has at
least one or two parameters
(x
for one or x,y
for two real-valued samples, namely) and gives
a list of at least two values (statistic
for the output test
statistic, and p.value
for the calculated p-value). If necessary, the respective wrapper can be applied for the
user-defined function. To choose the one-sample variant of the test, sample2=NULL
should be used.
Additional parameters to the statistical test can be passed with ...
As two input samples (sample1
and sample2
, respectively), two lists of fuzzy numbers should be provided.
These values have to be the fuzzy numbers defined in the FuzzyNumbers
package (triangular, trapezoidal, etc.).
If only one-sample test is used, sample1
is related to the fuzzy statistical sample, and sample2=NULL
should
be set.
To calculate the output, the multi-statistic epistemic bootstrap approach is used. Depending on the parameter
bootstrapMethod
, the standard (std
) or antithetic (anti
) method can be used. Then,
the p-values are combined using the respective method (a value of the parameter combineMethod
, which
is the same as for the function CombinePValues
) to give a single result.
Value
The output is given in the form of a real number (the p-value) for the selected statistical test.
References
Grzegorzewski, P., Romaniuk, M. (2022) Bootstrap Methods for Epistemic Fuzzy Data. International Journal of Applied Mathematics and Computer Science, 32(2)
Grzegorzewski, P., Romaniuk, M. (2022) Bootstrapped Kolmogorov-Smirnov Test for Epistemic Fuzzy Data. Communications in Computer and Information Science, CCIS 1602, pp. 494-507, Springer
Gagolewski, M., Caha, J. (2021) FuzzyNumbers Package: Tools to deal with fuzzy numbers in R. R package version 0.4-7, https://cran.r-project.org/web/packages=FuzzyNumbers
See Also
AverageStatisticEpistemicTest
for the epistemic bootstrap test related to averaging statistics,
ResamplingStatisticEpistemicTest
for the epistemic bootstrap test related to resampling statistics
EpistemicTest
for the general epistemic bootstrap test
Other epistemic bootstrap statistical test:
AverageStatisticEpistemicTest()
,
EpistemicTest()
,
ResamplingStatisticEpistemicTest()
Examples
# seed PRNG
set.seed(1234)
# generate two independent initial fuzzy samples
list1<-SimulateSample(20,originalPD="rnorm",parOriginalPD=list(mean=0,sd=1),
incrCorePD="rexp", parIncrCorePD=list(rate=2),
suppLeftPD="runif",parSuppLeftPD=list(min=0,max=0.6),
suppRightPD="runif", parSuppRightPD=list(min=0,max=0.6),
type="trapezoidal")
list2<-SimulateSample(20,originalPD="rnorm",parOriginalPD=list(mean=0,sd=1),
incrCorePD="rexp", parIncrCorePD=list(rate=2),
suppLeftPD="runif",parSuppLeftPD=list(min=0,max=0.6),
suppRightPD="runif", parSuppRightPD=list(min=0,max=0.6),
type="trapezoidal")
# apply the Kolmogorov-Smirnov two sample test for two different samples
MultiStatisticEpistemicTest(list1$value,list2$value,cutsNumber = 30)
# and the same sample twice
MultiStatisticEpistemicTest(list1$value,list1$value,cutsNumber = 30,bootstrapMethod = "anti",
combineMethod = "mean")
# and the one-sample K-S test for the standard normal distribution
MultiStatisticEpistemicTest(list1$value,sample2=NULL,cutsNumber = 30,y="pnorm")