dot-mplusMultinomial: Internal Function for Multinomial Regression in Mplus

Description Usage Arguments Value Author(s) Examples

Description

Internal Function for Multinomial Regression in Mplus

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
.mplusMultinomial(
  dv,
  iv,
  data,
  idvar = "",
  integration = 1000,
  processors = 2,
  OR = TRUE,
  pairwise = TRUE,
  ...
)

Arguments

dv

A character string with the variable name for the dependent (outcome) variable.

iv

A character vector with the variable name(s) for the independent (predictor/explanatory) variable(s).

data

A dataset.

idvar

Optional. A character string indicating the name of the ID variable. Not currently used but may be used in future.

integration

An integer indicating the number of Monte Carlo integration points to use. Defaults to 1000.

processors

An integer indicating the number of processors to use. Passed to Mplus. Defaults to 2.

OR

A logical value whether odds ratios should be returned. Defaults to TRUE.

pairwise

A logical value indicating whether all pairwise tests should be computed. Defaults to TRUE.

...

Additional arguments passed to mplusModeler().

Value

A list of results and Mplus model object.

Author(s)

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

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
## Not run: 

set.seed(1234)
tmpd <- data.frame(
  x1 = rnorm(200),
  x2 = rnorm(200),
  x3 = cut(rnorm(200),
           breaks = c(-Inf, -.7, .7, Inf),
           labels = c("a", "b", "c")))
tmpd$y <- cut(rnorm(200, sd = 2) + tmpd$x1 + tmpd$x2 + I(tmpd$x3 == "b"),
              breaks = c(-Inf, -.5, 1, Inf),
              labels = c("L", "M", "H"))

tmpres <- MplusAutomation:::.mplusMultinomial(
  dv = "y",
  iv = c("x1", "x2"),
  data = tmpd,
  pairwise = TRUE)
tmpres2 <- MplusAutomation:::.mplusMultinomial(
  dv = "y",
  iv = c("x1", "x2"),
  data = tmpd,
  pairwise = FALSE)
tmpres3 <- MplusAutomation:::.mplusMultinomial(
  dv = "y",
  iv = c("x1@0", "x2@0"),
  data = tmpd,
  pairwise = FALSE)


## End(Not run)

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