EWMethod {FuzzyResampling} | R Documentation |
E(xpected value)W(idth) resampling method for triangular and trapezoidal fuzzy numbers
Description
EWMethod
returns the secondary (bootstrapped) sample and uses the resampling
scheme which does not change the expected values and widths of the fuzzy variables from
the initial sample (the EW method, see (Grzegorzewski et al, 2020)).
Usage
EWMethod(initialSample, b = n, increases = FALSE)
Arguments
initialSample |
Initial sample of triangular or trapezoidal fuzzy numbers. |
b |
The number of fuzzy values in the resampled (secondary) sample. If this parameter is not specified, the number of values in the initial sample is used. The parameter should be integer value more than 0. |
increases |
If |
Details
The initial sample should consist of triangular or trapezoidal fuzzy numbers, given as a single vector or a whole matrix. In each row, there should be a single fuzzy number in one of the forms:
left end of the support, left end of the core, right end of the core, right end of the support, or
left increment of the support, left end of the core, right end of the core, right increment of the support.
In this second case, the parameter increases=TRUE
has to be used.
The resampling procedure produces b
fuzzy values.
During the first step, the fuzzy value from the initial sample is randomly chosen (with repetition).
Then the new fuzzy variable, which preserves the expected value and width of the old one, is randomly created.
If the parameter b
is not specified, it is equal to the length of the initial sample.
The output is given in the same form as the initial sample.
Value
This function returns matrix with b
rows of double values.
In each row, there is a single resampled fuzzy number.
These fuzzy numbers have the same form as the values from the initial sample depending on the provided parameter increases
.
References
Grzegorzewski, P., Hryniewicz, O., Romaniuk, M. (2020) Flexible resampling for fuzzy data International Journal of Applied Mathematics and Computer Science, 30 (2), pp. 281-297
See Also
ClassicalBootstrap
, VAMethod
for the VA method,
VAFMethod
for the VAF method, VAAMethod
for the VAA method,
DMethod
for the d method, WMethod
for the w method
Other resampling functions:
ClassicalBootstrap()
,
DMethod()
,
VAAMethod()
,
VAFMethod()
,
VAMethod()
,
WMethod()
Examples
# prepare some fuzzy numbers (first type of the initial sample)
fuzzyValues <- matrix(c(0.25,0.5,1,1.25,0.75,1,1.5,2.2,-1,0,0,2),
ncol = 4,byrow = TRUE)
# generate the secondary sample using the EW method
set.seed(12345)
EWMethod(fuzzyValues)
EWMethod(fuzzyValues,b=4)
# prepare some fuzzy numbers (second type of the initial sample)
fuzzyValuesInc <- matrix(c(0.25,0.5,1,0.25,0.25,1,1.5,0.7,1,0,0,2),
ncol = 4,byrow = TRUE)
# generate the secondary sample using the EW method
EWMethod(fuzzyValuesInc,increases = TRUE)
EWMethod(fuzzyValuesInc,b=4,increases = TRUE)