extract: Extract function to make Mplus output work with the 'texreg'...

Description Usage Arguments Value Author(s) See Also Examples

Description

This is a method for extracting output in a format suitable for the texreg package. Uses coef for most the work.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
extract.mplus.model(model, summaries = "none", cis = FALSE,
  escape.latex = FALSE, ...)

extract.mplusObject(model, summaries = "none", cis = FALSE, ...)

## S4 method for signature 'mplus.model'
extract(model, summaries = "none", cis = FALSE,
  escape.latex = FALSE, ...)

## S4 method for signature 'mplusObject'
extract(model, summaries = "none", cis = FALSE,
  ...)

Arguments

model

An Mplus model object. This typically comes either from readModels directly, or indirectly via mplusModeler. The results will have different classes, but extract methods are defined for both.

summaries

A character vector which summaries to include. Defaults to “none”.

cis

A logical whether to extract confidence intervals.

escape.latex

A logical value whether to escape dollar signs in coefficient names for LaTeX. Defaults to FALSE.

...

Additional arguments passed to coef.mplus.model.

Value

A texreg object, or for multiple group models, a list of texreg objects.

Author(s)

Joshua F. Wiley <[email protected]>

See Also

readModels

Other Mplus-Formatting: coef.mplus.model, confint.mplus.model, print.MplusRstructure, summary.mplusObject

Examples

 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
## Not run: 
# simple example of a model using builtin data
# demonstrates use
test <- mplusObject(
  TITLE = "test the MplusAutomation Package;",
  MODEL = "
    mpg ON wt hp;
    wt WITH hp;",
  OUTPUT = "STANDARDIZED;",
  usevariables = c("mpg", "wt", "hp"),
  rdata = mtcars)

res <- mplusModeler(test, "mtcars.dat", modelout = "model1.inp", run = 1L)

extract(res$results)
# there is also a method for mplusObject class
extract(res)

# load the texreg package
# to use pretty printing via screenreg
# uncomment to run these examples
# library(texreg)
# screenreg(res)
# screenreg(res, type = 'stdyx')

# screenreg(res, type = 'un', params = 'regression',
#   single.row=TRUE)
# screenreg(res, type = 'un', params = 'regression', summaries = 'CFI',
#   single.row=TRUE)

# remove files
unlink("mtcars.dat")
unlink("model1.inp")
unlink("model1.out")
unlink("Mplus Run Models.log")

## End(Not run)

MplusAutomation documentation built on Nov. 25, 2018, 5:04 p.m.