Learn R Programming

lawstat (version 2.4.1)

symmetry.test: Test of Symmetry

Description

This function performs the test for symmetry about an unknown median. Users can choose to perform the Mira test (see Mira(1999)), the Cabilio-Masaro test (see Cabilio and Masaro(1996)), or the MGG test (see Miao, Gel and Gastwirth (2006)). The MGG option is set by default. NAs from the data are omitted.

Usage

symmetry.test(x, option = c("mgg.test", "cabilio.masaro.test", 
              "mira.test"))

Arguments

x
the input data to be tested for symmetry.
option
give the choice to test statistics.

Value

  • A list with the following numeric components.
  • p.valuethe p-value for the test.
  • statisitcobserved test statistic.
  • data.namea character string giving the name of the data.

References

Cabilio, P. and Masaro, J. (1996) A simple test of symmetry about an unknown median. The Canadian Journal of Statistics, 24, 349-361. Miao, W., Gel, Y. R., and Gastwirth, J. L. (2006) A New Test of Symmetry about an Unknown Median. Random Walk, Sequential Analysis and Related Topics - A Festschrift in Honor of Yuan-Shih Chow. Eds.: Agnes Hsiung, Cun-Hui Zhang, and Zhiliang Ying, World Scientific Publisher, Singapore. Mira, A. (1999) Distribution-free test for symmetry based on Bonferroni's measure. Journal of Applied Statistics, 26, 959-972.

Examples

Run this code
data(zuni)
symmetry.test(zuni[,"Revenue"])

##        Test of Symmetry - MGG Test
##
## data:  zuni[, "Revenue"] 
## Test Statistic = 5.0321, p-value = 4.851e-07

Run the code above in your browser using DataLab