TwoSampleCTest {FuzzyResampling}R Documentation

Calculate p-value of the two-sample test for the mean

Description

TwoSampleCTest returns the p-value of the two-sample test for the mean using the resampling method.

Usage

TwoSampleCTest(
  initialSample1,
  initialSample2,
  numberOfSamples = 100,
  theta = 1/3,
  resamplingMethod = "ClassicalBootstrap",
  increases = FALSE
)

Arguments

initialSample1

The first initial sample which consists of triangular or trapezoidal fuzzy numbers. More than one value can be given in the form of matrix.

initialSample2

The second initial sample which consists of triangular or trapezoidal fuzzy numbers. More than one value can be given in the form of matrix.

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 resamplingMethods vector.

increases

If TRUE is used, then the fuzzy numbers should be given in the form: left increment of the support, left end of the core, right end of the core, right increment of the support. Otherwise, the default value FALSE is used and the fuzzy numbers should be given in the form: left end of the support, left end of the core, right end of the core, right end of the support.

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:

  1. left end of the support, left end of the core, right end of the core, right end of the support, or

  2. 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 two-sample test for the mean (denoted further as the two-sample C-test, see Lubiano et al. (2016)). This test checks the null hypothesis that the Aumann-type means of two fuzzy samples are equal.

Value

This function returns double value which is equal to the p-value of the two-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

OneSampleCTest for the one-sample C-test

Other bootstrapped version of test: OneSampleCTest()

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)

# prepare the slightly shifted second sample

fuzzyValuesShift <- fuzzyValues + 0.5

# seed PRNG

set.seed(1234)

# calculate the p-value using the classical (i.e. Efron's) bootstrap

TwoSampleCTest(fuzzyValues, fuzzyValuesShift)

# calculate the p-value using the VA resampling method

TwoSampleCTest(fuzzyValues, fuzzyValuesShift, resamplingMethod = "VAMethod")



[Package FuzzyResampling version 0.6.3 Index]