-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path02-intro-mplusautomation.Rmd
73 lines (45 loc) · 1.99 KB
/
02-intro-mplusautomation.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
```{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.
```
# Introduction to `MplusAutomation`
---
`MplusAutomation`[@hallquist2018] is designed to streamline the use of Mplus, a powerful statistical software for modeling complex data developed by Muthen and Muten (https://www.statmodel.com). With `MplusAutomation`, researchers can automate the process of estimating latent variable models, running batches of models, extracting results, and generating data visualizations - all within the R environment.
---
**WHAT?**
- `MplusAutomation` is an `R` package
- It "wraps around" the `Mplus` program
- Requires both `R` & `Mplus` software
- Requires learning some basics of 2 programming languages
- Car metaphor: R/Rstudio is the *steering wheel or dashboard* & Mplus is the *engine*
---
**WHY?**
- `MplusAutomation` can provide clearly organized work procedures in which every research decision can be documented in a single place
- Increase reproducibility, organization, efficiency, and transparency
---
**HOW?**
- The interface for MplusAutomation is entirely within R-Studio. You do not need to open Mplus
- The code presented will be very repetitive by design
---
Below is a template for `mplusObject()` & `mplusModeler()` functions. Use this template to run statistical models with Mplus.
```{r, eval = FALSE}
m_template <- mplusObject(
TITLE =
"",
VARIABLE =
"",
ANALYSIS =
"",
PLOT =
"",
OUTPUT =
"",
usevariables = colnames(),
rdata = )
m_template_fit <- mplusModeler(m_template,
dataout=here("", ".dat"),
modelout=here("", ".inp"),
check=TRUE, run = TRUE, hashfilename = FALSE)
```
<div style="text-align: center;"><img src="images/ucsb_logo.png" width="75%" /></div>