OneSampleCTest {FuzzyResampling} | R Documentation |
Calculate p-value of the one-sample test for the mean
Description
OneSampleCTest
returns the p-value of the one-sample test for the mean using the resampling method.
Usage
OneSampleCTest(
initialSample,
mu_0,
numberOfSamples = 100,
theta = 1/3,
resamplingMethod = "ClassicalBootstrap",
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. |
mu_0 |
Triangular or trapezoidal fuzzy number which is used for the null hypothesis of the C-test. |
numberOfSamples |
Number of the bootstrapped samples used to estimate the p-value. |
theta |
The weighting parameter for the mid/spread distance applied in the C-test. |
resamplingMethod |
Name of the resampling method, which is used to generate the bootstrapped samples.
For the possible names check the values of |
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 the resamplingMethod
parameter to estimate the p-value of the one-sample
test for the mean (denoted further as the one-sample C-test, see Lubiano et al. (2016)).
This test checks the null hypothesis that the Aumann-type mean of the fuzzy numbers is equal to a given fuzzy number mu_0
.
Value
This function returns double value which is equal to the p-value of the one-sample C-test.
References
Lubiano, M.A., Montenegro M., Sinova, B., de Saa, S.R., Gil, M.A. (2016) Hypothesis testing for means in connection with fuzzy rating scale-based data: algorithms and applications European Journal of Operational Research, 251, pp. 918-929
See Also
TwoSampleCTest
for the two-sample C-test
Other bootstrapped version of test:
TwoSampleCTest()
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 p-value using the classical (i.e. Efron's) bootstrap
OneSampleCTest(fuzzyValues, mu_0 = c(0,0.5,1,1.5))
# calculate the p-value using the VA resampling method
OneSampleCTest(fuzzyValues, mu_0 = c(0,0.5,1,1.5),resamplingMethod = "VAMethod")