Creating a function that creates OpenMx models