if (FALSE) {
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)
}
Run the code above in your browser using DataLab