Universidad Complutense de Madrid
E-Prints Complutense

Automatic regrouping of strata in the chi-square test



Último año

Pérez-Salamero González, Juan Manuel y Regúlez-Castillo, Marta y Ventura-Marco, Manuel y Vidal-Meliá, Carlos (2017) Automatic regrouping of strata in the chi-square test. [ Documentos de Trabajo del Instituto Complutense de Análisis Económico (ICAE); nº 24, 2017, ISSN: 2341-2356 ]

Vista previa
Creative Commons License
Esta obra está bajo una licencia de Creative Commons: Reconocimiento - No comercial - Compartir igual.


URLTipo de URL


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.

Tipo de documento:Documento de trabajo o Informe técnico
Palabras clave:Chi-square test, statistical software, VBA, Mathematica, Continuous Sample of Working Lives.
Materias:Ciencias Sociales > Economía > Econometría
JEL:C46, C88, H55
Título de serie o colección:Documentos de Trabajo del Instituto Complutense de Análisis Económico (ICAE)
Código ID:45317
Depositado:02 Nov 2017 09:53
Última Modificación:02 Nov 2017 16:10

Descargas en el último año

Sólo personal del repositorio: página de control del artículo