\begin{Schunk}
\begin{Sinput}
 mod1mm <- model.matrix(mod1)
 head(mod1mm, 15)
\end{Sinput}
\begin{Soutput}
   (Intercept)        xnum1 xcat2Male zB zC zD
1            1  0.221608622         0  1  0  0
2            1 -0.231276910         0  0  0  1
3            1 -0.281808460         0  0  1  0
4            1  0.012702720         1  0  0  1
5            1  0.640549486         1  0  0  1
6            1  0.000329053         1  0  0  1
7            1  1.876086067         0  1  0  0
8            1  1.846589937         1  0  0  1
9            1 -0.717189068         0  0  1  0
10           1 -0.112679417         0  0  0  0
11           1 -0.200304178         0  0  0  0
12           1  1.354768108         0  0  0  0
13           1  0.894995240         0  0  0  1
14           1  0.145769927         1  0  0  0
15           1 -0.216373991         1  1  0  0
\end{Soutput}
\end{Schunk}
