Create a moderator matrix used in OSMASEM
It creates a moderator matrix used in OSMASEM.
create.modMatrix(RAM, output=c("A", "S"), mod)
RAM |
A RAM object including a list of matrices of the model
returned from |
output |
Whether the output is an "A" or "S" matrix. |
mod |
A string of moderator in the dataset. |
A character matrix.
Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>
## 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
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.