Skip to content
Snippets Groups Projects
README.txt 2.43 KiB
Newer Older
Laakso's avatar
Laakso committed
I wanted to learn how to perform LPA and especially how to draw plots using R.
I chose an article which used the data from my research group, although the data is not openly distributed.
Reference: Ronkainen, I., Lonka, K., Vinni-Laakso, J., Vesterinen, V.-M., & Salmela-Aro, K. (2024). Seitsemäsluokkalaisten kolmeen lukuaineeseen sekä ilmiölähtöiseen oppimiseen kohdistamat arvostukset ja odotukset: Motivaatioprofiilit. Kasvatus, 55(2), 129-149. https://doi.org/10.33348/kvt.126725
Laakso's avatar
Laakso committed
I am not sure whether the article is downloadable anymore (it was in fall when I chose it for this assignment) so I added the .pdf in my repo to see the original plots I want to replicate.
Laakso's avatar
Laakso committed


1. viewing descriptives of background variables: gender, age, and taloustilanne (recoding taloustilanne)
Laakso's avatar
Laakso committed
2. Computing mean sum variables, examining their descriptives and correlations
3. LPA and related plots:
This is what I wanted to learn to do and especially learn how to draw the plots. And it was not easy.
Laakso's avatar
Laakso committed
I am newbie with R, so wrangling the data and understanding how it should be wrangled to be able to draw such plots turned out to be difficult.
Laakso's avatar
Laakso committed
However, I'm very proud of myself for trying and I already learned a lot doing this assignment, and I did actually manage to draw some kind of LPA plot by myself. And elbow plot I made on my own.
Thanks Lauri for helping and explaining, and now the plot is exactly as in the article. And I am much more capable and confident with R.
Laakso's avatar
Laakso committed
Will definitely not be using SPSS to analyse data anymore or Excel to draw tables/plots/anything.. 

Notes.
Laakso's avatar
Laakso committed
*My data is slightly different from the article data, as it was not specified in the text which observations were deleted/ignored in the analyses, so my results differ a bit. An insightful assignment in this way also, to indicate that replicating analyses is difficult, or is it that reporting analyses is inadequate?
*I am aware the correlation matrix I made is not similar to article's correlation matrix, but this was not my goal now; drawing APA style tables in R is in my near-future to-learn-with-R-list.
*ANOVA, post hoc, crosstables and Chi-square test I've studied previously in another course, so I skipped them now, this assignment was for learning LPA with R.
*Using GitBash is so difficult. Knowing the commands and almost being able to use them is nice, but from now on I'm going to use git from RStudio.
*Finally just got accepted to GitHub Education and will be able to try using CoPilot, exciting.