%0 Journal Article %A Núñez-Antón, Vicente %A Pérez Salamero González, Juan Manuel %A Regúlez Castillo, Marta %A Ventura-Marco, Manuel %A Vidal-Meliá, Carlos %T Automatic regrouping of strata in the goodness-of-fit chi-square test %J Documentos de Trabajo del Instituto Complutense de Análisis Económico (ICAE) %D 2019 %@ 2013–8830 %U https://hdl.handle.net/20.500.14352/140.1 %X Pearson’s chi-square test is widely employed in social and health sciences to analyse categorical data and contingency tables. For the test to be valid, the sample size must be large enough to provide a minimum number of expected elements per category. This paper develops functions for regrouping strata automatically, thus enabling the goodness-of-fit test to be performed within an iterative procedure. The usefulness and performance of these functions is illustrated by means of a simulation study and the application to 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 labour economics and the Spanish public pension system. %~