Supplementary computer code for:
Caswell, H. 2020. The formal demography of kinship II. Multistate models, parity, and sibship. Demographic Research, Volume 42, Article 38, Pages 1097 -- 1144
Published 19 June 2020
http://www.demographic-research.org/Volumes/Vol42/38/
DOI: 10.4054/DemRes.2020.42.38
The zip file contains three programs and three folders. The files permit replication of the analysis of kinship data for Slovakia (figures 4-17 of the paper). The files are for use in Matlab (version R2018b).
Program: kinship_function_parity_4867.m
This Matlab function takes as input a set of block-structured transition and fertility matrices and returns the kinship results.
Program: calling_kinship_SVK_4867.m
This Matlab script reads in set of matrices produced by the program matrix_construction_4867.m and then calls the function kinship_function_parity_4867.m to obtain the resulting kinship network. The results are saved in the folder SVK_kinout with filenames SVKkinout1960.mat, etc.
Program: matrix_construction_4867.m
This Matlab script reads in tables giving life tables and parity transitions for Slovakia (obtained from the Human Mortality and Human Fertility databases, respectively), and constructs the age-specific parity transition matrices, the parity-specific survival matrices, the age-specific fertility matrices, and the parity-specific offspring assignment matrices.
Folder: SVK_tables
This folder contains a set of Matlab .mat files that contain data tables for life tables (from the Human Mortality Database) and fertility (from the Human Fertility Database) for Slovakia from 1950 to 2014. The life table data are obtained from the female period life table file. The fertility data are from the period parity state transition file.
Folder: SVK_kinmats
This folder contains a set of matrices for Slovakia, as produced by the program matrix_construction_4867.m. Each year, from 1960 to 2014, occupies a Matlab .mat file, with names SVKmats1960.mat, etc.
Folder: SVK_kinout
This folder, which is very large, consistes of a set of Matlab .mat files containing the output of the analysis for Slovakia, for each year from 1960 to 2014. These output files are produced by the program calling_kinship_SVK_4867.m. A user who wishes to explore alternative analyses of to plot results in a different way can do so from these output files without the need to run the code again.