Growth curve modeling of human behavior and affect
This year I had the opportunity of modeling data on aggression and depression scores from two samples of children: overweight and non-overweight (Cerniglia et al., 2019).
The results showed statistical differences between groups at each time point, marked gender differences, and a peak of scores around age 8, both in the overweight group (see Fig. 1 and Fig.2 below).
But, beside the results, I wanted to share my experience with the data analyses.
Specifically, I would like to highlight the importance of data visualization.
You probably heard many times that a visual inspection of the data prior to the statistical data analyses is very important, and it is. Given that growth curve modeling implies modeling change over time, it's fundamental to have a clear idea on how these changes over time actually occur.
To visualize these changes I used ggplot2 (Wickham, 2016). There are many ways to visualize these data, but I preferred to see smoothed curves and this code below can give you an idea on how to start:
ggplot(data = full aes(x = Time y = sqrt group = ID color=Sex.)) #option: geom_point() geom_line(alpha=.2) geom_line(aes(x = Time, y = sqrt),size=1) xlab("Time") ylab("Aggression") + ylim(0.70,4.1) scale_x_continuous(breaks=seq(0,3,by=1)) facet_wrap(~ Group)
Once you have visualized the changes over time it's time to build your model, which in this case helps you to describe interindividual differences in intraindividual change. However that's a matter for another blog post that I hope I will have the time to share with you in the future.
In the meanwhile, I hope this tip will help you.
Happy modeling! :)
Cerniglia, L., Cimino, S., Erriu, M., Jezek, S., Almenara, C. A., & Tambelli, R. (2019). A nine-year longitudinal study on trajectories of aggressive and depressive symptoms in male and female overweight children. BMC Research Notes, 12(710). https://doi.org/10.1186/s13104-019-4734-x
Wickham H. (2016). ggplot2: Elegant graphics for data analysis. Berlin: Springer.