\begin{Schunk}
\begin{Sinput}
 mediat.mod.3 <- '
  ## measurement model
  Agency =~ Agency1 + Agency2 + Agency3
  Intrinsic =~ Intrin1 + Intrin2 + Intrin3
  Extrinsic =~ Extrin1 + Extrin2 + Extrin3
  Positive =~ PosAFF1 + PosAFF2 + PosAFF3
  Negative =~ NegAFF1 + NegAFF2 + NegAFF3
  ## structural model
  Positive ~ b1*Intrinsic + Agency
  Negative ~ b2*Extrinsic
  Intrinsic ~ a1*Agency
  Extrinsic ~ a2*Agency
  Intrinsic ~~ Extrinsic
  ## define mediation parameters (indirect effects)
  ind1 := a1 * b1
  ind2 := a2 * b2
  ind1 == ind2
  '
\end{Sinput}
\end{Schunk}
