First, we will use the path analysis method to specify the model. In this approach, we first define the variables and then specify the regression, variance, and covariance paths. While this method is verbose, it is designed to expose all of the parts of the model. Hiding functionality behind defaults allows a script to be shorter to type, but it can mean that it is difficult to understand exactly what the model does (the “Black Box” problem). By making all parts of the model specification explicit, we expose all of the model to inspection. We have found that this philosophy results in scripts that are easier for i) students to learn and ii) others to understand. # load the OpenMx package into R library(OpenMx) # read the data into an R dataframe factorData <- read.csv(“demoTwoFactor.csv”) # define which indicators load on each factor indicatorsF1 <- c(“x1”, “x2”, “x3”, “x4”, “x5”) indicatorsF2 <- c(“y1”, “y2”, “y3”, “y4”, “y5”) # create a vector of all of the manifest variables manifests <- c(indicatorsF1, indicatorsF2) # define which indicator is to be used to