Function which uses the sem function in the
lavaan package to fit the model
$$L = \alpha_0 + \alpha_1 \cdot X + \epsilon_1, \epsilon_1 \sim N(0,\sigma_1^2)$$
$$K = \alpha_2 + \alpha_3 \cdot X + \alpha_4 \cdot L + \epsilon_2, \epsilon_2 \sim~ N(0,\sigma_2^2)$$
$$Y = \alpha_5 + \alpha_6 \cdot K + \alpha_{XY} \cdot X + \epsilon_3, \epsilon_3 \sim N(0,\sigma_3^2)$$
in order to obtain point and standard error estimates
of the parameters
\(\alpha_1, \alpha_3, \alpha_4, \alpha_6, \alpha_{XY}\)
for the GLM setting.
See the vignette for more details.