-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlpa_enum.Rmd
743 lines (530 loc) · 21.3 KB
/
lpa_enum.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
---
title: "Latent Profile Analysis"
author: "IMMERSE Training Team"
date: "Updated: `r format(Sys.time(), '%B %d, %Y')`"
output:
html_document:
toc: yes
toc_float: yes
theme: flatly
pdf_document:
toc: yes
editor_options:
markdown:
wrap: sentence
---
```{r, echo=FALSE}
htmltools::img(src = knitr::image_uri(file.path("figures/immerse_hex.png")),
alt = 'logo',
style = 'position:absolute; top:0; right:0; padding:10px;',
width ="250",
height ="193")
```
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
warning = FALSE,
message = FALSE) #Here, I have made it so that when you knit your .rmd, warnings and messages will not show up in the html markdown.
```
------------------------------------------------------------------------
# IMMERSE Project
![](figures/IESNewLogo.jpg){style="float: left;" width="300"}
The Institute of Mixture Modeling for Equity-Oriented Researchers, Scholars, and Educators (IMMERSE) is an IES funded training grant (R305B220021) to support Education scholars in integrating mixture modeling into their research.
- Please [visit our website](https://immerse.education.ucsb.edu/) to learn more and apply for the year-long fellowship.
- Follow us on [Twitter](https://twitter.com/IMMERSE_UCSB)!
How to reference this walkthrough: *This work was supported by the IMMERSE Project* (IES - 305B220021)
Visit our [GitHub](https://github.com/immerse-ucsb) account to download the materials needed for this walkthrough.
------------------------------------------------------------------------
*Example: PISA Student Data*
1. The first example closely follows the vignette used to demonstrate the [tidyLPA](https://data-edu.github.io/tidyLPA/articles/Introduction_to_tidyLPA.html) package (Rosenberg, 2019).
- This model utilizes the `PISA` data collected in the U.S. in 2015. To learn more about this data [see here](http://www.oecd.org/pisa/data/).
- To access the 2015 US `PISA` data & documentation in R use the following code:
Variables:
`broad_interest`
: composite measure of students' self reported broad interest
`enjoyment`
: composite measure of students' self reported enjoyment
`instrumental_mot`
: composite measure of students' self reported instrumental motivation
`self_efficacy`
: composite measure of students' self reported self efficacy
```{r, eval = FALSE}
#devtools::install_github("jrosen48/pisaUSA15")
#library(pisaUSA15)
```
------------------------------------------------------------------------
## Latent Profile Models
Latent Profile Analysis (LPA) is a statistical modeling approach for estimating distinct profiles of variables.
In the social sciences and in educational research, these profiles could represent, for example, how different youth experience dimensions of being engaged (i.e., cognitively, behaviorally, and affectively) at the same time.
Note that LPA works best with continuous variables (and, in some cases, ordinal variables), but is not appropriate for dichotomous (binary) variables.
Many analysts have carried out LPA using a latent variable modeling approach.
From this approach, different parameters - means, variances, and covariances - are freely estimated across profiles, fixed to be the same across profiles, or constrained to be zero.
The MPlus software is commonly used to estimate these models (see [here](https://www.statmodel.com/examples/mixture.shtml)) using the expectation-maximization (EM) algorithm to obtain the maximum likelihood estimates for the parameters.
Different *models* (or how or whether parameters are estimated) can be specified and estimated.
While MPlus is widely-used (and powerful), it is costly, closed-source, and can be difficult to use, particularly with respect to interpreting or using the output of specified models as part of a reproducible workflow
------------------------------------------------------------------------
## Terminology for specifying variance-covariance matrix
The code used to estimate LPA models in this walkthrough is from the `tidyLPA` package.
`TidyLPA`([source](https://data-edu.github.io/tidyLPA/articles/Introduction_to_tidyLPA.html)) is an R package designed to estimate latent profile models using a tidy framework.
It can interface with Mplus via the MplusAutomation package, enabling the estimation of latent profile models with different variance-covariance structures.
- `model 1` Profile-invariant / Diagonal: Equal variances, and covariances fixed to 0
- `model 2` Profile-varying / Diagonal: Free variances and covariances fixed to 0
- `model 3` Profile-invariant / Non-Diagonal: Equal variances and equal covariances
- Note: an alternative to Model 3 is freely estimating the covariances
- `model 4` Free variances, and equal covariances
- `model 5` Equal variances, and free covariances
- `model 6` Profile Varying / Non-Diagonal: Free variances and free covariances
### Model 1
*Profile-invariant/diagonal:*
- *Equal Variances*: Variances are fixed to equality across the profiles (i.e., variances are constrained to be equal for each profile).
- *Covariances fixed to zero* (i.e., the off-diagonal cells of the matrix are zero).
The most parsimonious model and the most restricted.
$$
\begin{pmatrix}
\sigma^2_1 & 0 & 0 \\
0 & \sigma^2_2 & 0 \\
0 & 0 & \sigma^2_3 \\
\end{pmatrix}
$$
### Model 2
*Profile-varying/diagonal:*
- *Free variances*: Variances parameters are freely estimated across the profiles (i.e., variances vary by profile).
- *Covariances* *fixed to zero* (i.e., the off-diagonal cells of the matrix are zero).
This model is more flexible and less parsimonious than model 1.
$$
\begin{pmatrix}
\sigma^2_{1p} & 0 & 0 \\
0 & \sigma^2_{2p} & 0 \\
0 & 0 & \sigma^2_{3p} \\
\end{pmatrix}
$$
### Model 3
*Profile-invariant/ non-diagonal or unrestricted:*
- *Equal variances:* Variances are fixed to equality across profile.
(i.e., variances are constrained to be same for each profile).
- *Equal Covariances*: The covariances are now estimated and constrained to be equal.
- An alternative to Model 3 is freely estimating the covariances (Model 5 here).
$$
\begin{pmatrix}
\sigma^2_1 & \sigma_{12} & \sigma_{13} \\
\sigma_{12} & \sigma^2_2 & \sigma_{23} \\
\sigma_{13} & \sigma_{23} & \sigma^2_3 \\
\end{pmatrix}
$$
### Model 4
Varying means, varying variances, and equal covariances:
- *Free variances*: Variances parameters are freely estimated across profiles (i.e., variances vary by profile).
- *Equal Covariances*: Covariances are constrained to be equal.
This model is also considered to be an extension of Model 3.
$$
\begin{pmatrix}
\sigma^2_{1p} & \sigma_{12} & \sigma_{13} \\
\sigma_{12} & \sigma^2_{2p} & \sigma_{23} \\
\sigma_{13} & \sigma_{23} & \sigma^2_{3p} \\
\end{pmatrix}
$$
### Model 5
Varying means, equal variances, and varying covariances:
- *Equal variances:* Variances are fixed to equality across the profiles.
(i.e., variances are constrained to be same for each profile).
- *Free Covariances*: Covariances are now freely estimated across the profiles.
This model is also considered to be an extension of Model 3.
$$
\begin{pmatrix}
\sigma^2_{1} & \sigma_{12p} & \sigma_{13p} \\
\sigma_{12p} & \sigma^2_{2} & \sigma_{23p} \\
\sigma_{13p} & \sigma_{23p} & \sigma^2_{3} \\
\end{pmatrix}
$$
### Model 6
*Profile-varying / Non-diagonal*:
- *Free variances*: Variances parameters are freely estimated across profiles (i.e., variances vary by profile).
- *Free Covariances*: Covariances are now freely estimated across the profiles.
This is the most complex and unrestricted model.
It is also the least parsimonious
*Note*: The unrestricted model is also sometimes known as Model 4.
$$
\begin{pmatrix}
\sigma^2_{1p} & \sigma_{12p} & \sigma_{13p} \\
\sigma_{12p} & \sigma^2_{2p} & \sigma_{23p} \\
\sigma_{13p} & \sigma_{23p} & \sigma^2_{3p} \\
\end{pmatrix}
$$
------------------------------------------------------------------------
## Load packages
```{r}
library(naniar)
library(tidyverse)
library(haven)
library(glue)
library(MplusAutomation)
library(here)
library(janitor)
library(gt)
library(tidyLPA)
library(pisaUSA15)
library(cowplot)
library(filesstrings)
here::i_am("lpa_enum.Rmd")
```
------------------------------------------------------------------------
## Prepare Data
```{r, eval=TRUE}
pisa <- pisaUSA15[1:500,] %>%
dplyr::select(broad_interest, enjoyment, instrumental_mot, self_efficacy)
```
------------------------------------------------------------------------
## Descriptive Statistics
```{r}
ds <- pisa %>%
pivot_longer(broad_interest:self_efficacy, names_to = "variable") %>%
group_by(variable) %>%
summarise(mean = mean(value, na.rm = TRUE),
sd = sd(value, na.rm = TRUE))
ds %>%
gt () %>%
tab_header(title = md("**Descriptive Summary**")) %>%
cols_label(
variable = "Variable",
mean = md("M"),
sd = md("SD")
) %>%
fmt_number(c(2:3),
decimals = 2) %>%
cols_align(
align = "center",
columns = mean
)
```
------------------------------------------------------------------------
## Enumeration
------------------------------------------------------------------------
### `tidyLPA`
------------------------------------------------------------------------
Enumerate using `estimate_profiles()`:
- Estimate models with profiles $K = 1:5$
- Model has 4 continuous indicators
- Default variance-covariance specifications (model 1)
- Change `variances` and `covariances` to indicate the model you want to specify, in this example, we are estimating all six models.
```{r, eval=FALSE}
# Run LPA models
lpa_fit <- pisa %>%
estimate_profiles(1:5,
package = "MplusAutomation",
ANALYSIS = "starts = 500 100;",
OUTPUT = "sampstat residual tech11 tech14",
variances = c("equal", "varying", "equal", "varying", "equal", "varying"),
covariances = c("zero", "zero", "equal", "equal", "varying", "varying"),
keepfiles = TRUE)
# Compare fit statistics
get_fit(lpa_fit)
# Move files to folder
files <- list.files(here(), pattern = "^model")
move_files(files, here("tidyLPA"), overwrite = TRUE)
```
CHECK EVERY SINGLE OUTPUT TO ENSURE MODELS CONVERGED AND MAKE NOTE OF MODELS THAT DID NOT!
...please :)
------------------------------------------------------------------------
### `Mplus`
------------------------------------------------------------------------
Alternative method to `estimate_profiles()`: Run enumeration using `mplusObject` method
You can change the model specification for LPA using the syntax provided in lecture.
#### Model 1
When estimating LPA in Mplus, the default variance/covariance specification is the most restricted model (Model 1).
So we don't have to specify anything here.
```{r, cache = TRUE, eval = FALSE}
lpa_k14 <- lapply(1:5, function(k) {
lpa_enum <- mplusObject(
TITLE = glue("Profile {k}"),
VARIABLE = glue(
"usevar = broad_interest-self_efficacy;
classes = c({k}); "),
ANALYSIS =
"estimator = mlr;
type = mixture;
starts = 500 100;",
OUTPUT = "sampstat svalues residual tech11 tech14;",
usevariables = colnames(pisa),
rdata = pisa)
lpa_enum_fit <- mplusModeler(lpa_enum,
dataout=glue(here("enum_lpa", "lpa_pisa")),
modelout=glue(here("enum_lpa", "c{k}_lpa_m1.inp")) ,
check=TRUE, run = TRUE, hashfilename = FALSE)
})
```
#### Model 2
Here, an addition loop adds the variance/covariance specifications for each class-specific statement.
For the profile-varying/diagonal specification, you must specify the variances to be freely estimated:
`broad_interest-self_efficacy;`
```{r, eval = FALSE}
lpa_m2_k14 <- lapply(1:5, function(k){
# This MODEL section changes the model specification
MODEL <- paste(sapply(1:k, function(i) {
glue("
%c#{i}%
broad_interest-self_efficacy; ! variances are freely estimated
")
}), collapse = "\n")
lpa_enum_m2 <- mplusObject(
TITLE = glue("Profile {k} - Model 2"),
VARIABLE = glue(
"usevar = broad_interest-self_efficacy;
classes = c({k});"),
ANALYSIS =
"estimator = mlr;
type = mixture;
starts = 500 100;",
MODEL = MODEL,
OUTPUT = "sampstat svalues residual tech11 tech14;",
usevariables = colnames(pisa),
rdata = pisa)
lpa_m2_fit <- mplusModeler(lpa_enum_m2,
dataout = here("enum_lpa", "lpa_pisa"),
modelout = glue(here("enum_lpa","c{k}_lpa_m2.inp")),
check = TRUE, run = TRUE, hashfilename = FALSE)
})
```
For reference, here is the Mplus syntax for different specifications:
**Fixed covariance to zero (DEFAULT)**:
`broad_interest WITH enjoyment@0;`
**Free covariance**:
`broad_interest WITH enjoyment;`
**Equal covariances**:
`%c#1%`
`broad_interest WITH enjoyment (1);`
`%c#2%`
`broad_interest WITH enjoyment (1);`
**Equal variance (DEFAULT)**:
`%c#1%`
`broad_interest (1);`
`%c#2%`
`broad_interest (1);`
**Free variance**:
`mth_scor-bio_scor;`
You can also open the `tidyLPA` .inp files to see the specifications.
------------------------------------------------------------------------
## Table of Fit
Evaluate each model specification separately using fit indices.
```{r}
source("enum_table")
# Read in model
output_pisa <- readModels(here("tidyLPA"), quiet = TRUE)
enum_fit(output_pisa)
enum_table(output_pisa, 1:5, 6:10, 11:15, 16:20, 21:25, 26:29)
```
------------------------------------------------------------------------
## Information Criteria Plot
Look for "elbow" to help with profile selection
```{r}
source("ic_plot")
ic_plot(output_pisa)
```
Based on fit indices, I am choosing the following candidate models:
1. Model 1: 2 Profile
2. Model 2: 3 Profile
3. Model 3: 4 Profile
4. Model 4: 3 Profile
5. Model 5: 2 Profile
6. Model 6: 2 Profile
------------------------------------------------------------------------
## Compare models
### Correct Model Probability (cmpK) recalculation
Take the candidate models and recalculate the approximate correct model probabilities (Masyn, 2013)
```{r, eval=TRUE}
# CmpK recalculation:
enum_fit1 <- enum_fit(output_pisa)
stage2_cmpk <- enum_fit1 %>%
slice(2, 8, 14, 18, 22, 27) %>%
mutate(SIC = -.5 * BIC,
expSIC = exp(SIC - max(SIC)),
cmPk = expSIC / sum(expSIC),
BF = exp(SIC - lead(SIC))) %>%
select(Title, Parameters, BIC:AWE, cmPk, BF)
# Format Fit Table
stage2_cmpk %>%
gt() %>%
tab_options(column_labels.font.weight = "bold") %>%
fmt_number(
7,
decimals = 2,
drop_trailing_zeros = TRUE,
suffixing = TRUE
) %>%
fmt_number(c(3:6),
decimals = 2) %>%
fmt_number(8,decimals = 2,
drop_trailing_zeros=TRUE,
suffixing = TRUE) %>%
fmt(8, fns = function(x)
ifelse(x>100, ">100",
scales::number(x, accuracy = .1))) %>%
tab_style(
style = list(
cell_text(weight = "bold")
),
locations = list(cells_body(
columns = BIC,
row = BIC == min(BIC[1:nrow(stage2_cmpk)])
),
cells_body(
columns = aBIC,
row = aBIC == min(aBIC[1:nrow(stage2_cmpk)])
),
cells_body(
columns = CAIC,
row = CAIC == min(CAIC[1:nrow(stage2_cmpk)])
),
cells_body(
columns = AWE,
row = AWE == min(AWE[1:nrow(stage2_cmpk)])
),
cells_body(
columns = cmPk,
row = cmPk == max(cmPk[1:nrow(stage2_cmpk)])
),
cells_body(
columns = BF,
row = BF > 10)
)
)
```
### Compare loglikelihood
You can also compare models using nested model testing directly with MplusAutomation.
Note that you can only compare across models but the profiles must stay the same.
```{r}
# MplusAutomation Method using `compareModels`
compareModels(output_pisa[["model_2_class_3.out"]],
output_pisa[["model_4_class_3.out"]], diffTest = TRUE)
```
Here, Model 1 (restricted, fewer parameters) is nested in Model 2.
The chi-square difference test, assuming nested models, shows a significant improvement in fit for Model 2 over Model 1, despite the added parameters.
------------------------------------------------------------------------
## Latent Profile Plot
```{r}
source("plot_lpa.txt")
plot_lpa(model_name = output_pisa$model_3_class_4.out)
```
Save figure
```{r, eval = FALSE}
ggsave(here("figures", "model3_profile4.png"), dpi = "retina", bg = "white", height=5, width=8, units="in")
```
## Classifications Diagnostics Table
Use Mplus to calculate k-class confidence intervals (Note: Change the syntax to make your chosen \*k\*-class model):
```{r, eval = FALSE}
classification <- mplusObject(
TITLE = "LPA - Calculated k-Class 95% CI",
VARIABLE =
"usevar = broad_interest-self_efficacy;
classes = c1(4);",
ANALYSIS =
"estimator = ml;
type = mixture;
starts = 0;
processors = 10;
optseed = 468036; ! This seed is taken from chosen model output
bootstrap = 1000;",
MODEL =
"
! This is copied and pasted from the chosen model input
%c1#1%
broad_interest (vbroad_interest);
enjoyment (venjoyment);
instrumental_mot (vinstrumental_mot);
self_efficacy (vself_efficacy);
broad_interest WITH enjoyment (broad_interestWenjoyment);
broad_interest WITH instrumental_mot (broad_interestWinstrumental_mot);
broad_interest WITH self_efficacy (broad_interestWself_efficacy);
enjoyment WITH instrumental_mot (enjoymentWinstrumental_mot);
enjoyment WITH self_efficacy (enjoymentWself_efficacy);
instrumental_mot WITH self_efficacy (instrumental_motWself_efficacy);
%c1#2%
broad_interest (vbroad_interest);
enjoyment (venjoyment);
instrumental_mot (vinstrumental_mot);
self_efficacy (vself_efficacy);
broad_interest WITH enjoyment (broad_interestWenjoyment);
broad_interest WITH instrumental_mot (broad_interestWinstrumental_mot);
broad_interest WITH self_efficacy (broad_interestWself_efficacy);
enjoyment WITH instrumental_mot (enjoymentWinstrumental_mot);
enjoyment WITH self_efficacy (enjoymentWself_efficacy);
instrumental_mot WITH self_efficacy (instrumental_motWself_efficacy);
%c1#3%
broad_interest (vbroad_interest);
enjoyment (venjoyment);
instrumental_mot (vinstrumental_mot);
self_efficacy (vself_efficacy);
broad_interest WITH enjoyment (broad_interestWenjoyment);
broad_interest WITH instrumental_mot (broad_interestWinstrumental_mot);
broad_interest WITH self_efficacy (broad_interestWself_efficacy);
enjoyment WITH instrumental_mot (enjoymentWinstrumental_mot);
enjoyment WITH self_efficacy (enjoymentWself_efficacy);
instrumental_mot WITH self_efficacy (instrumental_motWself_efficacy);
%c1#4%
broad_interest (vbroad_interest);
enjoyment (venjoyment);
instrumental_mot (vinstrumental_mot);
self_efficacy (vself_efficacy);
broad_interest WITH enjoyment (broad_interestWenjoyment);
broad_interest WITH instrumental_mot (broad_interestWinstrumental_mot);
broad_interest WITH self_efficacy (broad_interestWself_efficacy);
enjoyment WITH instrumental_mot (enjoymentWinstrumental_mot);
enjoyment WITH self_efficacy (enjoymentWself_efficacy);
instrumental_mot WITH self_efficacy (instrumental_motWself_efficacy);
!CHANGE THIS SECTION TO YOUR CHOSEN k-CLASS MODEL
%OVERALL%
[C1#1](c1);
[C1#2](c2);
[C1#3](c3);
Model Constraint:
New(p1 p2 p3 p4);
p1 = exp(c1)/(1+exp(c1)+exp(c2)+exp(c3));
p2 = exp(c2)/(1+exp(c1)+exp(c2)+exp(c3));
p3 = exp(c3)/(1+exp(c1)+exp(c2)+exp(c3));
p4 = 1/(1+exp(c1)+exp(c2)+exp(c3));",
OUTPUT = "cinterval(bcbootstrap)",
usevariables = colnames(pisa),
rdata = pisa)
classification_fit <- mplusModeler(classification,
dataout=here("mplus", "class.dat"),
modelout=here("mplus", "class.inp") ,
check=TRUE, run = TRUE, hashfilename = FALSE)
```
Create table
```{r}
source("diagnostics_table")
class_output <- readModels(here("mplus", "class.out"))
diagnostics_table(class_output)
```
------------------------------------------------------------------------
## References
Hallquist, M. N., & Wiley, J. F.
(2018).
MplusAutomation: An R Package for Facilitating Large-Scale Latent Variable Analyses in Mplus.
Structural equation modeling: a multidisciplinary journal, 25(4), 621-638.
Miller, J. D., Hoffer, T., Suchner, R., Brown, K., & Nelson, C.
(1992).
LSAY codebook.
Northern Illinois University.
Muthén, B. O., Muthén, L. K., & Asparouhov, T.
(2017).
Regression and mediation analysis using Mplus.
Los Angeles, CA: Muthén & Muthén.
Muthén, L.K.
and Muthén, B.O.
(1998-2017).
Mplus User's Guide.
Eighth Edition.
Los Angeles, CA: Muthén & Muthén
Rosenberg, J. M., van Lissa, C. J., Beymer, P. N., Anderson, D. J., Schell, M. J.
& Schmidt, J. A.
(2019).
tidyLPA: Easily carry out Latent Profile Analysis (LPA) using open-source or commercial software [R package].
<https://data-edu.github.io/tidyLPA/>
R Core Team (2017).
R: A language and environment for statistical computing.
R Foundation for Statistical Computing, Vienna, Austria.
URL <http://www.R-project.org/>
Wickham et al., (2019).
Welcome to the tidyverse.
Journal of Open Source Software, 4(43), 1686, <https://doi.org/10.21105/joss.01686>
------------------------------------------------------------------------
![](figures/UCSB_Navy_mark.png){width="75%"}