Overview & Downloads

Below you find the data and R scripts to replicate all examples from the book. The material was created using R (version 4.1.2) and RStudio (version 2021.09.0+351).

The files in each zip file are organized in a chapter-specific RStudio project and we use relative paths when referring to the different directories. The top-level directory (reference point for the relative paths) contains most R-Scripts and the .Rproj file which can be used to open the project in RStudio. If you change the directory structure or the names of directories, you need to adjust the scripts accordingly. It might be also necessary to install additional libraries and (free) software to run some the scripts.

For further instructions on how to work with the zip files we refer to the readme.html pages of each archive.

Please note that this website also contains additional material providing commented code and instructions as well as some bonus material introducing further examples and analytical tools. To access this material please turn to the chapter-specific sub-pages.

Table of Contents (with link to subpage) Download link (*.zip)
Chapter 1 - Introduction No code
Chapter 2 - Describing and Visualizing Sequences Chapter02.zip
Chapter 3 - Comparing Sequences Chapter03.zip
Chapter 4 - Identifying Groups In Sequence Data Chapter04.zip
Chapter 5 - Multidimensional Sequence Analysis Chapter05.zip
Chapter 6 - Examining Group Differences Without Cluster Analysis Chapter06.zip
Chapter 7 - Combining SA With Other Explanatory Methods No code
Chapter 8 - Conclusions No code

Data source

The data for examples come from the German Family Panel (pairfam), release 10.0 Brüderl et al. (2019). A description of the study can be found in Huinink et al. (2011).

We gratefully acknowledge the permission of the pairfam team to share a reduced version of their data to illustrate all techniques presented in the book with real-world survey data.

If you are interested in using the complete data sets, please turn to: https://www.pairfam.de/en/

How to cite

If you are re-using our code for your own projects, we kindly ask you to cite our book.

Brüderl, J., Drobnič, S., Hank, K., Nauck, B., Neyer, F. J., Walper, S., Alt, P., Bozoyan, C., Buhr, P., Finn, C., Garrett, M., Greischel, H., Gröpler, N., Hajek, K., Herzig, M., Huyer-May, B., Lenke, R., Minkus, L., Müller, B., … Wilhelm, B. (2019). The german family panel (pairfam). ZA5678 data file version 10.0.0. GESIS Data Archive. https://doi.org/10.4232/pairfam.5678.10.0.0
Huinink, J., Brüderl, J., Nauck, B., Walper, S., Castiglioni, L., & Feldhaus, M. (2011). Panel analysis of intimate relationships and family dynamics (pairfam): Conceptual framework and design. Zeitschrift Für Familienforschung, 23(1), 77–101.



If you see mistakes or want to suggest changes, please create an issue on the source repository.


Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. Source code is available at https://github.com/sa-book/sa-book.github.io, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".