# Longitudinal Analysis > Longitudinal methods, made clear > Generated by All in One SEO Pro v5.0.5.1, this is an llms.txt file, used by LLMs to index the site. ## Sitemaps - [XML Sitemap](https://longitudinalanalysis.com/sitemap.xml): Contains all public & indexable URLs for this website. ## Posts - [Guides](https://longitudinalanalysis.com/blog/): Longitudinal Analysis Guides - [Understanding time-varying predictors in multilevel models for longitudinal data](https://longitudinalanalysis.com/understanding-time-varying-predictors-in-multilevel-models-for-longitudinal-data/): This post explains how to include time-varying predictors in multilevel models for analyzing dynamic processes over time. By incorporating variables that change over time, such as income or educational support, researchers can gain a nuanced understanding of factors influencing outcomes like mental health. - [Understanding the longitudinal data workflow: a comprehensive guide](https://longitudinalanalysis.com/understanding-the-longitudinal-data-workflow-a-comprehensive-guide/): Unlock insights from longitudinal data with our step-by-step guide, from import to analysis. Master the workflow to elevate your research. - [Estimating and visualizing multilevel models for change in R](https://longitudinalanalysis.com/estimating-and-visualizing-multilevel-models-for-change-in-r/): Learn how to analyse longitudinal data using the multilevel model for change with R. Hands on example using real world data and syntax. - [How to run a multiple mediation model in R](https://longitudinalanalysis.com/a-multiple-mediation-model-r/): Fit a multiple mediation model in R with lavaan using parallel, serial, and longitudinal examples with code and path diagrams. - [Mediating vs Moderating Variable: How to Choose the Right One](https://longitudinalanalysis.com/mediating-vs-moderating-variable-how-to-choose-the-right-one/): Mediating vs moderating variable with examples. Learn how to distinguish between mediation and moderation, choose the right model, and avoid common mistakes. - [Visualizing transitions in time using R and alluvial graphs](https://longitudinalanalysis.com/visualizing-transitions-in-time-using-r-and-alluvial-graphs/): Learn how to visualize transitions in time for categorical data using Sankey plot/river/alluvial graphs and R. Easy hands one example using real data - [Complete guide to visualizing longitudinal data in R](https://longitudinalanalysis.com/complete-guide-to-visualizing-longitudinal-data-in-r/): Unlock the secrets of longitudinal data in R with this complete guide. Master the art of insightful visualizations for impactful analysis. - [AI Agent for Data Analysis and Why You Need Taste](https://longitudinalanalysis.com/ai-agent-for-data-analysis-and-why-you-need-taste/): An AI agent for data analysis can write code quickly, but researchers still have to build expertise and understand what decisions are made - [Understanding causal direction using the cross-lagged model](https://longitudinalanalysis.com/understanding-causal-direction-using-the-cross-lagged-model/): Learn how to investigate the causal direction of two variables using the cross-lagged model and longitudinal data. Hands on example using R and real data - [Estimating and visualizing Latent Growth Models with R](https://longitudinalanalysis.com/estimating-and-visualizing-latent-growth-models-with-r/): Tutorial showing you how to visualize change in time and how to estimate it using Latent Growth Modelling with R. Hands on longitudinal data analysis. - [Estimating non-linear change in time using the multilevel model for change](https://longitudinalanalysis.com/estimating-non-linear-change-in-time-using-the-multilevel-model-for-change/): Learn how to model non-linear change in time using the multilevel model for change in R. Hands on tutorial with real data. - [Explaining change using multilevel and time constant predictors](https://longitudinalanalysis.com/explaining-change-using-multilevel-and-time-constant-predictors/): Learn how to explain change in time using time constant predictors using the multilevel model. Examples with real data and R code - [Estimating non-linear change with Latent Growth Models in R](https://longitudinalanalysis.com/estimating-non-linear-change-with-latent-growth-models-in-r/): Learn how to estimate and visualize nonlinear Latent Growth Models (LGM) using R. Hands on example using real world longitudinal data and code - [Comparing the multilevel model with the Latent Growth Model](https://longitudinalanalysis.com/comparing-the-multilevel-model-with-the-latent-growth-model/): Learn how the multilevel model for change and the latent growth models are different and when to use each one. Hands on example using real data and R - [Causal Mediation in R: A Practical Guide](https://longitudinalanalysis.com/causal-mediation-in-r/): Learn how to do causal mediation in R using real-world panel data. Learn how to interpret ACME, ADE and how to use binary mediators - [Attrition bias: what is it and how to measure it](https://longitudinalanalysis.com/attrition-bias-what-is-it-and-how-to-measure-it/): Attrition bias explained: how participant dropout occurs, how to measure it, and why it matters for valid longitudinal research. - [Dynamic documents: a smarter way to share results](https://longitudinalanalysis.com/using-dynamic-documents-to-present-results-in-r/): Learn how to use R Markdown to create a dynamic document for reproducible reports, automate updates, and seamlessly integrate code, text, and results in R. - [Including time constant controls in Latent Growth Models](https://longitudinalanalysis.com/including-time-constant-controls-in-latent-growth-models/): This post discusses incorporating time-constant predictors in Latent Growth Models (LGM) using R to better understand changes over time. It details coding in R using real data. It compares strategies for including these predictors and interpreting their effects on intercept and slope in LGMs. - [How to estimate and interpret parallel Latent Growth Models (LGM) in R: a step-by-step guide](https://longitudinalanalysis.com/how-to-estimate-and-interpret-parallel-latent-growth-models-lgm-in-r-a-step-by-step-guide/): Learn how to estimate and interpret Parallel Latent Growth Models (LGM) in R and lavaan. This step-by-step guide explores modeling multiple trajectories, analyzing relationships over time, and visualizing results. Perfect for researchers in psychology, sociology, and public health using longitudinal data. - [Cleaning longitudinal data in R: a step-by-step guide](https://longitudinalanalysis.com/cleaning-longitudinal-data-in-r-a-step-by-step-guide/): Explore key R commands for cleaning longitudinal data, including recoding variables and handling missing data effectively. - [Preparing longitudinal data for analysis in R: a step-by-step guide](https://longitudinalanalysis.com/preparing-longitudinal-data-for-analysis-in-r-a-step-by-step-guide/): Explore the crucial steps of data preparation for longitudinal analysis in R, from importing to reshaping data, in this step-by-step guide. - [Exploring longitudinal data in R: tables and summaries](https://longitudinalanalysis.com/exploring-longitudinal-data-in-r-tables-and-summaries/): Unlock the power of R for longitudinal data analysis! Learn to navigate tables and summaries with ease in our latest guide. - [How to include time-varying predictors in Latent Growth Models (LGM) in R](https://longitudinalanalysis.com/how-to-include-time-varying-predictors-in-latent-growth-models-lgm-in-r/): This post explores how to incorporate time-varying predictors into Latent Growth Models (LGM) to analyse changes in variables over time. It discusses data preparation, using R code for modeling, and differentiating between concurrent and lagged effects. - [How to include control variables in a cross-lagged panel model](https://longitudinalanalysis.com/how-to-include-control-variables-in-a-cross-lagged-panel-model/): Learn how to include control variables in a Cross-Lagged Panel Model (CLPM) in R, using time-constant and time-varying predictors to refine causal analysis. - [How to present results from longitudinal analysis](https://longitudinalanalysis.com/how-to-present-results-from-longitudinal-analysis/): Learn how to present results from longitudinal data analysis using R Markdown, stargazer, texreg, and visualization tools like tidySEM and semPlot. - [A Guide to Moderated Mediation and Mediated Moderation](https://longitudinalanalysis.com/a-guide-to-moderated-mediation-and-mediated-moderation/): A practical guide to moderated mediation, explaining how indirect effects vary across contexts, with clear examples and applied modeling strategies. - [Hands-On Introduction to Moderation Analysis](https://longitudinalanalysis.com/hands-on-introduction-to-moderation-analysis/): Learn how moderation analysis reveals when and for whom effects change in longitudinal data, with clear examples and practical modelling guidance. - [Longitudinal Mediation in R: A Hands-On Guide](https://longitudinalanalysis.com/longitudinal-mediation-in-r-a-hands-on-guide/): Learn how to run longitudinal mediation analysis in R using lavaan. Step-by-step guide to model indirect effects and causal pathways over time. - [Introduction to Path and Mediation Analysis with R](https://longitudinalanalysis.com/introduction-to-path-and-mediation-analysis-with-r/): Introduction to path analysis and mediation analysis in R. Estimate direct, indirect, and total effects with diagrams, examples, and code. - [Mixture Latent Growth Models R: A Step-by-Step Guide](https://longitudinalanalysis.com/mixture-latent-growth-models-r-a-step-by-step-guide/): The blog post discusses Mixture Latent Growth Models (MLGM) that enhance traditional longitudinal models by identifying latent subgroups with distinct trajectories over time. It details the implementation of MLGM in R using the tidySEM package and compares results from using R and Mplus for improved understanding of individual and aggregate changes. - [Merge Data in R: Complete Guide to Joining Datasets](https://longitudinalanalysis.com/merge-data-in-r-complete-guide-to-joining-datasets/): Learn how to merge data when you have information in different files, at different levels and at multiple time points. Explore four real-world scenarios - [Data structures for longitudinal analysis: wide versus long](https://longitudinalanalysis.com/data-structures-for-longitudinal-analysis-wide-versus-long/): Learn how to create, store and reshape longitudinal data. Reshaping data from wide to long data format and back using R. Hands on examples - [Data cleaning tips for making the most of longitudinal data](https://longitudinalanalysis.com/data-cleaning-tips-for-making-the-most-of-longitudinal-data/): Before visualising and analysing longitudinal data, it is essential to prepare it correctly. In this guide, we cover data cleaning tips before visualisation - [How to create reproducible workflows for longitudinal data analysis](https://longitudinalanalysis.com/how-to-develop-a-reproducible-workflow-for-longitudinal-data-analysis/): Learn best practices for longitudinal data analysis, including Git, renv, and reproducible workflows to improve efficiency, accuracy, and collaboration. ## Pages - [Home](https://longitudinalanalysis.com/): Learn how to clean, analyse, and visualise longitudinal data with expert guidance, practical tools, and real-world data. - [Understanding attrition bias in longitudinal data](https://longitudinalanalysis.com/interactive/attrition-bias/): An interactive guide to attrition bias in longitudinal data: how people leaving a study bias its results, how to measure it and how big it is in a real study. - [Introduction to Longitudinal Data Analysis using R](https://longitudinalanalysis.com/intro-long-analysis-course/): Live online course · February 2027 Introduction to Longitudinal Data Analysis using R Choose, fit and interpret the right longitudinal model for your research A live online course with Prof. Alexandru Cernat, author of Longitudinal Data Analysis Using R. Learn how to use longitudinal analysis to answer your research questions. Dates1–12 Feb 2027 Time08:00–11:00 Pacific11:00–14:00 - [Within and between variation](https://longitudinalanalysis.com/interactive/within-between/): Longitudinal data has two sources of variation: differences between people, and change within them. An interactive explainer, on income and life satisfaction. - [Interactive guides](https://longitudinalanalysis.com/interactive/): Tools you can play with. Each one takes a single idea from longitudinal analysis and turns it into something you can move with your hands rather than read about: change the numbers, watch what the model does, and see where the intuition comes from. Interactive guide The first interactive guide is on its way. - [Privacy policy](https://longitudinalanalysis.com/privacy-policy/): Last updated: 31 July 2026 1. Who we are Alexandru Cernat, trading as LongitudinalAnalysis.com, is the data controller responsible for the personal information described in this policy. Email: contact@alexcernat.com This policy applies when you visit longitudinalanalysis.com (the "Website"), contact us, subscribe to the newsletter, book or attend a course, or purchase another service directly from - [Terms](https://longitudinalanalysis.com/terms/): Last updated: 31 July 2026 1. About us LongitudinalAnalysis.com is operated by Alexandru Cernat trading as LongitudinalAnalysis.com ("we", "us", "our"). Email: contact@alexcernat.com Unless expressly stated otherwise, our courses and services are provided independently and are not provided, accredited or endorsed by the University of Manchester or any other institution. 2. These Terms These Terms apply - [Newsletter](https://longitudinalanalysis.com/newsletter/): Get actionable info on longitudinal research in your inbox Join and receive: The longitudinal analysis checklist. 63 checks across planning, data preparation, modelling, validation, and reporting. A PDF to keep next to every project, sent to you immediately. The code and data behind every guide. Access to the R code and datasets used across the - [Longitudinal analysis mentorship](https://longitudinalanalysis.com/longitudinal-analysis-mentorship/): Get support with you analysis with our longitudinal analysis mentorship program. Use regular meetings and peer support to drive your project forward - [](https://longitudinalanalysis.com/thank-you/): Thank you! I'm so happy you decided to join our newsletter to get more in-depth knowledge of Longitudinal Data Analysis. You can access your present HERE. Want another quick win in your journey to master longitudinal data? I've put together all you need to know about the key concepts, commands and models in the Ultimate - [Forum](https://longitudinalanalysis.com/community/) - [Longitudinal Data Analysis Using R](https://longitudinalanalysis.com/long-data-r-extra/): Supplemental materials This page includes code and supplemental materials for the Longitudinal Data Analysis Using R book. Accessing the data The primary dataset used throughout this book is Understanding Society. This is a large yearly panel based in the UK. The data can be accessed for free from the UK Data Archive. Code from book - [About LongitudinalAnalysis.com](https://longitudinalanalysis.com/about/): Many researchers turn to longitudinal data to address critical questions, but quickly find themselves lost, unsure where to begin, overwhelmed by complex methods, and faced with scattered or unclear guidance. LongitudinalAnalysis.com was created to support their journey. We offer practical tools, real-world examples, and clear explanations to help researchers learn how to collect data, choose - [Cookie Policy (EU)](https://longitudinalanalysis.com/cookie-policy-eu/) ## Categories - [data management](https://longitudinalanalysis.com/category/data-management/) - [visualization](https://longitudinalanalysis.com/category/visualization/) - [longitudinal data analysis](https://longitudinalanalysis.com/category/longitudinal-data-analysis/) - [communication](https://longitudinalanalysis.com/category/communication/) - [statistics](https://longitudinalanalysis.com/category/statistics/) ## Tags - [longitudinal data analysis](https://longitudinalanalysis.com/tag/longitudinal-data-analysis/) - [r](https://longitudinalanalysis.com/tag/r/) - [data management](https://longitudinalanalysis.com/tag/data-management/) - [data cleaning](https://longitudinalanalysis.com/tag/data-cleaning/) - [data restructuring](https://longitudinalanalysis.com/tag/data-restructuring/) - [structural equation modelling](https://longitudinalanalysis.com/tag/structural-equation-modelling/) - [latent growth modelling](https://longitudinalanalysis.com/tag/latent-growth-modelling/) - [visualization](https://longitudinalanalysis.com/tag/visualization/) - [multilevel modeling](https://longitudinalanalysis.com/tag/multilevel-modeling/) - [descriptive statistics](https://longitudinalanalysis.com/tag/descriptive-statistics/) - [tables](https://longitudinalanalysis.com/tag/tables/) - [summaries](https://longitudinalanalysis.com/tag/summaries/) - [data exploration](https://longitudinalanalysis.com/tag/data-exploration/) - [Mplus](https://longitudinalanalysis.com/tag/mplus/) - [communication](https://longitudinalanalysis.com/tag/communication/) - [path analysis](https://longitudinalanalysis.com/tag/path-analysis/) - [mediation](https://longitudinalanalysis.com/tag/mediation/) - [moderation](https://longitudinalanalysis.com/tag/moderation/) - [statistics](https://longitudinalanalysis.com/tag/statistics/) - [mediation analysis](https://longitudinalanalysis.com/tag/mediation-analysis/) - [causality](https://longitudinalanalysis.com/tag/causality/) - [AI](https://longitudinalanalysis.com/tag/ai/) - [data analysis](https://longitudinalanalysis.com/tag/data-analysis/)