digital-wellbeing / gametime-longitudinal

Data and code required to reproduce all analyses reported in our manuscript, Time spent playing video games is unlikely to impact well-being (Vuorre, Johannes, Magnusson, & Przybylski, 2021).
https://digital-wellbeing.github.io/gametime-longitudinal
Creative Commons Attribution 4.0 International
6 stars 0 forks source link

multigroup model #7

Closed rpsychologist closed 3 years ago

rpsychologist commented 3 years ago

Notes on the multigroup model.

The current model is estimating all parameters freely per game.

I guess what we want is to constrain some groups, e.g. add this to the lavaan call

group.equal = c("residuals", "residual.covariances", "lv.variances", "lv.covariances"),

https://github.com/digital-wellbeing/gametime-longitudinal/blob/f501fb5a4683210043c01b8d43fdd606774533ff/Analysis/Analysis.Rmd#L1024-L1031

A multigroup model + meta-analysis is probably the best approach.

I manage to fit multilevel RICLPM in Stan, and then compared it to a multigroup SEM + MA. This simulation can be found here https://github.com/digital-wellbeing/gametime-longitudinal/tree/analysis/Models/RICLPM-2L-stan

I also checked the frequentist properties of the whole lavaan multigroup + MA pipeline, the results are OK.

https://github.com/digital-wellbeing/gametime-longitudinal/blob/970625c1cad867c004e88095a83f08ec3930362d/Models/RICLPM-2L-stan/multilevel.Rmd#L517-L540

variable mean(est) theta RB(est) mean(se) sd(est) RB(se) CI_cover
betafree[1] 0.593 0.66 -0.101 0.151 0.154 -0.017 0.910
betafree[2] 0.196 0.22 -0.110 0.149 0.145 0.026 0.930
betafree[3] 0.491 0.55 -0.107 0.149 0.146 0.024 0.916
betafree[4] 0.314 0.33 -0.047 0.149 0.161 -0.073 0.920
sd_1[1] 0.470 0.50 -0.059 0.109 0.103 0.058 0.954
sd_1[2] 0.460 0.50 -0.079 0.110 0.109 0.009 0.936
sd_1[3] 0.464 0.50 -0.072 0.108 0.107 0.012 0.922
sd_1[4] 0.455 0.50 -0.090 0.110 0.112 -0.023 0.910

Other options

mvuorre commented 3 years ago

Awesome work! Yes we need to equate some if not all other parameters across games as you said. I'll work that in now. Then we'll work with the multi-group lavaan models + meta analyses.

mvuorre commented 3 years ago

I think we've answered this one and I'll proceed with meta-analysing the game-independent models.

mvuorre commented 3 years ago

Hooray