SEResamplingMean {FuzzyResampling} | R Documentation |
Calculate SE/MSE for the mean of the bootstrapped samples.
Description
SEResamplingMean
estimates the standard error (SE) or the mean-squared error (MSE) for the mean while the sample is bootstrapped using
one of the applied resampling methods.
Usage
SEResamplingMean(
initialSample,
resamplingMethod = "ClassicalBootstrap",
repetitions = 100,
trueMean = NA,
theta = 1/3,
increases = FALSE
)
Arguments
initialSample |
The initial sample which consists of triangular or trapezoidal fuzzy numbers. More than one value can be given in the form of matrix. |
resamplingMethod |
Name of the resampling method, which is used to generate the bootstrapped samples.
For the possible names check the values of |
repetitions |
Number of the secondary samples which are created using the selected resampling method. |
trueMean |
If the value is given, then the mean-squared error (MSE) is calculated for this value and the means of the bootstrapped samples. Otherwise, the standard error (SE) is calculated based on the overall mean of the secondary samples. |
theta |
The weighting parameter for the mid/spread distance applied to calculate the SE/MSE. |
increases |
If |
Details
The input fuzzy values should be 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 procedure uses the resampling method given in resamplingMethod
parameter to create the secondary (bootstrapped)
samples.
Then the mean (in the form of trapezoidal fuzzy number) is calculated for each new sample.
If the parameter trueMean
is set, then the mean-squared error (MSE) between this true value and each of the sample means
is estimated using the Bertoulzza et al.'s (aka mid/spread) distance (with the given weight theta
,
see Bertoluzza et al. (1995)).
Otherwise, the overall mean is calculated, and the standard error (SE) is estimated based on the overall mean
and each of the sample means.
In this case the Bertoulzza et al.'s distance (see Grzegorzewski, Romaniuk (2021)) is also applied.
Value
This function returns list of two double values:
-
mean
which is equal to the overall mean (if the SE is calculated) ortrueMean
parameter (if the MSE is calculated), -
SE
which is equal to the estimated SE/MSE of the mean.
The output mean
consists of four values which create the trapezoidal fuzzy number.
References
Bertoluzza, C., Corral, N., Salas, A. (1995) On a new class of distances between fuzzy numbers Mathware and Soft Computing, 2 (2), pp. 71-84
Grzegorzewski, P., Romaniuk, M. (2022) Bootstrap methods for fuzzy data Uncertainty and Imprecision in Decision Making and Decision Support: New Advances, Challenges, and Perspectives, pp. 28-47 Springer
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)
# seed PRNG
set.seed(1234)
# calculate the SE of the mean using the classical (i.e. Efron's) bootstrap
SEResamplingMean(fuzzyValues)
# calculate the SE of the mean using the VA resampling method
SEResamplingMean(fuzzyValues, resamplingMethod = "VAMethod")
# calculate the MSE of the given mean using the classical (i.e. Efron's) bootstrap
SEResamplingMean(fuzzyValues, trueMean = c(0,0.5,1,2))
# calculate the MSE of the given mean using the VA resampling method
SEResamplingMean(fuzzyValues, resamplingMethod = "VAMethod", trueMean = c(0,0.5,1,2))