lav_model_gradient_mml.R (part 1)