-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
72 lines (53 loc) · 3.09 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# minvariance
<!-- badges: start -->
<!-- badges: end -->
The goal of `minvariance` is to aid the understanding of longitudinal measurement invariance and see which parts of this method could be automated in R.
The vignettes on the [website of this package](https://milanwiedemann.github.io/minvariance/) aim to replicate some examples found online.
**If you have any questions, ideas, or comments please get in touch.**
## Installation
You can install the released version of `minvariance` from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("milanwiedemann/minvariance")
```
```{r}
library(tidyverse)
library(minvariance)
# Specify list of variables
# Generate lavaan syntax
long_minvariance_syntax(var_list = list(t1 = c("i1_t1", "i2_t1", "i3_t1"),
t2 = c("i1_t2", "i1_t2", "i1_t2")),
model = "configural") %>%
cat()
```
Here's another example with different variable names
```{r}
# Generate lavaan syntax
long_minvariance_syntax(var_list = list(t1 = c("a1", "b1", "c1"),
t2 = c("a2", "b2", "c2")),
model = "strong") %>%
cat()
```
## Resources and related work
R functions to test for longitudinal factorial/measurement invariance
- [Longitudinal Factor Analysis - Measurement Invariance by Nilam Ram](https://quantdev.ssri.psu.edu/tutorials/intro-basics-longitudinal-measurement-invariance)
- [Measurement Matters Resource List by Eiko Fried and Jessica Flake](https://docs.google.com/document/d/11jyoXtO0m2lUywpC04KjLvI5QcBUY4YtwEvw6cg2cMs)
- [Fried et al (2016). Measuring depression over time . . . Or not? Lack of unidimensionality and longitudinal measurement invariance in four common rating scales of depression. Psychological Assessment.](https://doi.org/10.1037/pas0000275) and [Supplemental Materials](http://supp.apa.org/psycarticles/supplemental/pas0000275/supplementary_materials.zip) with Mplus files
- [Grimm (2017) - lavaan Code for Chapter 14 - Modeling Change with Latent Variables Measured by Continuous Indicators by Julie Wood](https://quantdev.ssri.psu.edu/tutorials/growth-modeling-chapter-14-modeling-change-latent-variables-measured-continuous-indicators)
- [MIE - Measurement invariance explorer (R package) by Maksim Rudnev](https://github.com/MaksimRudnev/MIE.package)
- ["A Tutorial in Longitudinal Measurement Invariance Using Lavaan" by Robin Curtis, Sean Mackinnon, Roisin O'Connor](https://psyarxiv.com/tkzrb/)
- [measEq.syntax {semTools}](https://www.rdocumentation.org/packages/semTools/versions/0.5-2/topics/measEq.syntax)
- [On dimensionality, measurement invariance and suitabilityof sum scores for the PHQ-9 and the GAD-7](https://osf.io/arufy/) with Mplus Code using mplusautomation
- [lavaan group](https://groups.google.com/forum/#!topic/lavaan/nfdatPgLLhc)