\begin{Schunk}
\begin{Sinput}
 group.mod.1 <- 'posAffect ~ c(A, B)*agency'
 group.out.1 <- sem(group.mod.1, data = dat, meanstructure = TRUE, group = "gender")
 summary(group.out.1)
\end{Sinput}
\begin{Soutput}
lavaan (0.5-23.1097) converged normally after  19 iterations

  Number of observations per group         
  male                                             195
  female                                           185

  Estimator                                         ML
  Minimum Function Test Statistic                0.000
  Degrees of freedom                                 0
  Minimum Function Value               0.0000000000000

Chi-square for each group:

  male                                           0.000
  female                                         0.000

Parameter Estimates:

  Information                                 Expected
  Standard Errors                             Standard


Group 1 [male]:

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  posAffect ~                                         
    agency     (A)    0.452    0.079    5.704    0.000

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)
   .posAffect         1.890    0.203    9.329    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .posAffect         0.309    0.031    9.874    0.000


Group 2 [female]:

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  posAffect ~                                         
    agency     (B)    0.237    0.096    2.477    0.013

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)
   .posAffect         2.514    0.245   10.241    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .posAffect         0.419    0.044    9.618    0.000
\end{Soutput}
\end{Schunk}
