analysis of factors that interrupt problem behaviours I have three waves of longitudinal data on problem behaviours (e.g., peer victimization) and their possible consequences (e.g., depression one and two years later). I also have data on some protective factors (e.g., positive parenting). I would like to study factors that interrupt continuity between problem behaviours and consequences. For example, I would like to check if being a victim of violence relates to depression later in life, and if this relation could be interrupted by positive parenting. In other words, I would like to know if children who are victims of bullying, but then are exposed to positive parenting, develop less depression than the victimized children who are exposed to negative parenting. What kind of data analyses would you recommend for this? Thank you!
 A: It's difficult to answer this question directly, because there are (at least) two distinct challenges. The first is related to general strategies for observational panel data, and I can take a swing at giving advice (below). However, the second is something that will have to come from theory related to the questions you are asking, which will affect the choices for the model. Principally, you'll have to think carefully about how to lag the right-hand-side indicators. Does X at time t affect Y at time t or Y at time t+1 (or both)? This is really the challenging part of answering research questions like the ones you are interested in, and you probably won't get straightforward advice on those decisions here. This is related to theory as much as modeling decisions per se.
Assuming you can confidently choose a lag structure based on existing theory, observational data like this is best approached using a fixed-effects panel model. This allows you to isolate within-individual processes only by giving each respondent a unique intercept. If you are using R, you can check out the plm package, which is detailed here or the panelr package, which allows a more flexible approach (hybrid model) that separates within-individual and between-individual effects.
The reason fixed-effects models are most appropriate is that individuals in observational data have distinct average values, and alternative panel models (random-effects models) do not fully differentiate between-individual variation from within-individual variation. Identifying causality is not fully plausible here, but you can get closer by isolating within-individual processes.
