Przeszłość Demograficzna Polski (Jan 2015)

O programowaniu w środowisku R na przykładzie algorytmu obliczeniowego dla formuły do wykrywania kryzysów demograficznych

  • Dariusz K. Chojecki

Journal volume & issue
Vol. 37


Read online

The article presents Jacques Dupâquier’s method to detect demographic crises on the basis of the temporal distribution of deaths in its classical and modified form, popular in historical demography. The presentation of the method based on the standardised data is a pretext for studying the programming in R (language), which is a continuation of the previous article. The element that has been highlighted is the for-loop, presented step by step. An extensive introduction is supposed to familiarise the reader with the three programming codes of the functions that compute indicators of crisis for particular years: kryzysyDem1 (the classical form of the formula), kryzysyDem2 and kryzysyDem3, a modified form that takes into consideration three temporal perspectives of the development of the phenomenon, i.e. the past, present and future ones; the final results, which satisfy the determined limit criteria, are the average value of the results obtained for the three perspectives. The presented codes of the variants of Jacques Dupâquier’s formula should – to a significant extent – facilitate the computation of indicators of demographic crises including various limit criteria.