\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{t1}\hlkwb{<-}\hlkwd{aggregate}\hlstd{(X1,}\hlkwc{by}\hlstd{=}\hlkwd{list}\hlstd{(Z,ps.strat.fit.c),}\hlkwc{FUN}\hlstd{=mean)}
\hlstd{t2}\hlkwb{<-}\hlkwd{aggregate}\hlstd{(X2,}\hlkwc{by}\hlstd{=}\hlkwd{list}\hlstd{(Z,ps.strat.fit.c),}\hlkwc{FUN}\hlstd{=mean)}
\hlstd{t3}\hlkwb{<-}\hlkwd{aggregate}\hlstd{(X3,}\hlkwc{by}\hlstd{=}\hlkwd{list}\hlstd{(Z,ps.strat.fit.c),}\hlkwc{FUN}\hlstd{=mean)}
\hlstd{dnames}\hlkwb{<-}\hlkwd{list}\hlstd{(}\hlkwd{c}\hlstd{(}\hlstr{"Z=0"}\hlstd{,} \hlstr{"Z=1"}\hlstd{),}\hlkwd{c}\hlstd{(}\hlstr{"Q1"}\hlstd{,} \hlstr{"Q2"}\hlstd{,} \hlstr{"Q3"}\hlstd{,}\hlstr{"Q4"}\hlstd{,}\hlstr{"Q5"}\hlstd{))}
\hlkwd{matrix}\hlstd{(t1}\hlopt{$}\hlstd{x,}\hlkwc{nrow}\hlstd{=}\hlnum{2}\hlstd{,}\hlkwc{ncol}\hlstd{=nstrata,}\hlkwc{byrow}\hlstd{=}\hlnum{FALSE}\hlstd{,}\hlkwc{dimnames} \hlstd{= dnames )}   \hlcom{#Summary for X1: mean}
\end{alltt}
\begin{verbatim}
+            Q1        Q2       Q3        Q4       Q5
+ Z=0 0.9978433 0.9316459 0.979086 0.9546425 1.101412
+ Z=1 0.9675377 0.9354829 1.008106 0.9665335 1.095633
\end{verbatim}
\begin{alltt}
\hlkwd{matrix}\hlstd{(t2}\hlopt{$}\hlstd{x,}\hlkwc{nrow}\hlstd{=}\hlnum{2}\hlstd{,}\hlkwc{ncol}\hlstd{=nstrata,}\hlkwc{byrow}\hlstd{=}\hlnum{FALSE}\hlstd{,}\hlkwc{dimnames} \hlstd{= dnames )}   \hlcom{#Summary for X2: mean}
\end{alltt}
\begin{verbatim}
+            Q1        Q2        Q3        Q4        Q5
+ Z=0 -2.282388 -2.231281 -2.049605 -1.931326 -1.578578
+ Z=1 -2.335530 -2.220630 -1.985303 -1.929186 -1.583760
\end{verbatim}
\begin{alltt}
\hlkwd{matrix}\hlstd{(t3}\hlopt{$}\hlstd{x,}\hlkwc{nrow}\hlstd{=}\hlnum{2}\hlstd{,}\hlkwc{ncol}\hlstd{=nstrata,}\hlkwc{byrow}\hlstd{=}\hlnum{FALSE}\hlstd{,}\hlkwc{dimnames} \hlstd{= dnames )}   \hlcom{#Summary for X3: mean}
\end{alltt}
\begin{verbatim}
+             Q1         Q2         Q3        Q4        Q5
+ Z=0 -0.8727500 -1.1261686 -0.9283224 -1.002825 -1.422133
+ Z=1 -0.7485271 -0.7775068 -0.9098424 -1.093546 -1.086302
\end{verbatim}
\end{kframe}
\end{knitrout}