if (FALSE) {
m1 <- mplusObject(TITLE = "Reduced",
MODEL = "mpg ON wt;", rdata = mtcars)
m1.fit <- mplusModeler(m1, "mtcars.dat", run = 1L)
m2 <- mplusObject(TITLE = "Full",
MODEL = "mpg ON wt hp qsec;", rdata = mtcars)
m2.fit <- mplusModeler(m2, "mtcars.dat", run = 1L)
SummaryTable(list(m1.fit, m2.fit))
SummaryTable(list(m1.fit, m2.fit), type = "popup")
SummaryTable(list(m1.fit, m2.fit), type = "markdown",
keepCols = c("Title", "Parameters", "LL", "AIC", "CFI", "SRMR"),
caption = "Table of Model Fit Statistics",
split.tables = 200)
# remove files
unlink("mtcars.dat")
unlink("mtcars.inp")
unlink("mtcars.out")
unlink("Mplus Run Models.log")
closeAllConnections()
}
Run the code above in your browser using DataLab