This repository will provide some examples from my daily R workloads and parts of my PhD studies. Like everyone in the field of educational psychology, I dealed with challenging statistical problems. I will report about them.
This example shows you how to use lavaan
, knitr
, semTools
, kableExtra
and psych
to generate a multi-group longitudinal CFA. Additionally, the examples shows you how to automize the necessary table production for the results of the measurement invariances testing. It was used as a part of thesis, written with bookdown
. The output table looks similar to this:
This example how latent growth models can be established with lavaan
. The model specification is based on:
- Little, T. D. (2013). Longitudinal Structural Equation Modeling. New York: Guilford Press.
- Grimm, K. J., Ram, N. & Estabrook, R. (2016). Growth modeling: Structural equation and multilevel modeling approaches. Guilford Publications.
- Wu, A. D., Liu, Y., Gadermann, A. M. & Zumbo, B. D. (2010). Multiple-indicator mul- tilevel growth model: A solution to multiple methodological challenges in longitudinal studies. Social Indicators Research, 97 (2), 123–142. doi:10.1007/s11205-009-9496-8
The following example shows, how I used pairwise
for my DIF analysis.
In a first step, I recoded my Likert scales with car
. The scales need to start with zero. In the example, these are five. In addition, the example shows the automated export of four DIF analyzes in a combined graph in pdf format and calling the export using R-markdown
or bookdown
combined with knitr
.