Scatterometry is an important nonimaging and noncontact method for optical metrology. In scatterometry certain parameters of interest are determined by solving an inverse problem. This is done by minimizing a cost functional that quantifies the discrepancy among measured data and model evaluation. Solving the inverse problem is mathematically challenging owing to the instability of the inversion and to the presence of several local minima that are caused by correlation among parameters. This is a relevant issue, particularly when the inverse problem to be solved requires the retrieval of a high number of parameters. In such cases, methods to reduce the complexity of the problem are to be sought. In this work, we propose an algorithm suitable to automatically determine which subset of the parameters is mostly relevant in the model, and we apply it to the reconstruction of 2D and 3D scatterers. We compare the results with local sensitivity analysis and with the screening method proposed by Morris.