## A multiple regression model
model <- "y ~ x1 + x2
x1 ~~ 1*x1
x2 ~~ 1*x2
x1 ~~ x2"
## RAM specification
RAM <- lavaan2RAM(model, obs.variables=c("y", "x1", "x2"))
## Create a moderator matrix on A with "meanAge as the moderator.
A1 <- create.modMatrix(RAM=RAM, output="A", mod="meanAge")
A1
## Create a moderator matrix on S with "meanAge as the moderator.
S1 <- create.modMatrix(RAM=RAM, output="S", mod="meanAge")
S1
Run the code above in your browser using DataLab