Source: https://modeva.r-forge.r-project.org/modEvA-tutorial.pdf