detectVariables: Automatically detect variables from an Mplus model object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/mplus.R

Description

This is a function to automatically detect the variables used in an Mplus model object.

Usage

1
detectVariables(object, quiet = TRUE)

Arguments

object

An Mplus model object from mplusObject.#'

quiet

optional. If TRUE, show status messages in the console.

Value

A vector of variables from the R dataset to use.

Author(s)

Joshua F. Wiley <jwiley.psych@gmail.com>

See Also

mplusModeler, mplusObject

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
example1 <- mplusObject(MODEL = "mpg ON wt;",
  rdata = mtcars, autov = FALSE)
example1$usevariables
MplusAutomation:::detectVariables(example1)

example2 <- mplusObject(MODEL = "mpg ON wt;",
  rdata = mtcars, autov = TRUE)
example2$usevariables
example3 <- update(example2,
  MODEL = ~ . + "mpg ON qsec; wt WITH qsec;",
  autov = TRUE)
example3$usevariables
rm(example1, example2, example3)

MplusAutomation documentation built on July 1, 2021, 9:07 a.m.