Automatic regrouping of strata in the chi-square test
Juan Manuel Pérez-Salamero González,
Manuel Ventura-Marco and
Carlos Vidal-Melia ()
Additional contact information
Juan Manuel Pérez-Salamero González: Department of Financial Economics and Actuarial Science University of Valencia. (Spain).
Marta Regúlez-Castillo: Department of Applied Economics III University of the Basque Country (UPV/EHU) Bilbao (Spain).
Manuel Ventura-Marco: Department of Financial Economics and Actuarial Science University of Valencia. (Spain).
No 2017-24, Documentos de Trabajo del ICAE from Universidad Complutense de Madrid, Facultad de Ciencias Económicas y Empresariales, Instituto Complutense de Análisis Económico
Pearson´s chi-square test is widely employed in social and health science to analyze categorical data and contingency tables and to assess sample representativeness. For the test to be valid the sample size must be big enough to provide a minimum number of expected elements per category. If the researcher chooses to regroup the strata in order to solve the failure on the minimum size requirement, the existence of automatic re-grouping procedures in statistical software would be very useful, especially when tests are applied sequentially. After comprehensively reviewing the software that can carry out this test, we find that, with a few exceptions, there is no automatic regrouping of the strata to meet this requirement, although it would be very useful if this were available. This paper develops some functions for regrouping strata automatically no matter where they are located, thus enabling the test to be performed within an iterative procedure. The functions are written in Excel VBA (Visual Basic for Applications) and in Mathematica, so it would not be hard to implement them in other languages. The utility of these functions is shown by using three different datasets. Finally, the iterative use of the functions is applied to the Continuous Sample of Working Lives, a dataset that has been used in a considerable number of studies, especially on labor economics and the Spanish public pension system.
Keywords: Chi-square test; statistical software; VBA; Mathematica; Continuous Sample of Working Lives. (search for similar items in EconPapers)
JEL-codes: C46 C88 H55 (search for similar items in EconPapers)
Pages: 25 pages
References: View references in EconPapers View complete reference list from CitEc
Citations: Track citations by RSS feed
Downloads: (external link)
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
Persistent link: https://EconPapers.repec.org/RePEc:ucm:doicae:1724
Ordering information: This working paper can be ordered from
Facultad de Ciencias Económicas y Empresariales. Pabellón prefabricado, 1ª Planta, ala norte. Campus de Somosaguas, 28223 - POZUELO DE ALARCÓN (MADRID)
https://www.ucm.es/f ... -de-trabajo-del-icae
Access Statistics for this paper
More papers in Documentos de Trabajo del ICAE from Universidad Complutense de Madrid, Facultad de Ciencias Económicas y Empresariales, Instituto Complutense de Análisis Económico Contact information at EDIRC.
Bibliographic data for series maintained by Águeda González Abad ().