\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.i),}\hlkwc{FUN}\hlstd{=mean)}
\hlstd{t2}\hlkwb{<-}\hlkwd{aggregate}\hlstd{(X2,}\hlkwc{by}\hlstd{=}\hlkwd{list}\hlstd{(Z,ps.strat.fit.i),}\hlkwc{FUN}\hlstd{=mean)}
\hlstd{t3}\hlkwb{<-}\hlkwd{aggregate}\hlstd{(X3,}\hlkwc{by}\hlstd{=}\hlkwd{list}\hlstd{(Z,ps.strat.fit.i),}\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.6981254 0.8698683 0.9981973 1.114039 1.314847
+ Z=1 0.6476249 0.8667821 0.9940135 1.120220 1.335241
\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.627302 -2.318033 -2.066489 -1.872057 -1.570087
+ Z=1 -2.594987 -2.193335 -1.988481 -1.717672 -1.345579
\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.8686154 -0.9637137 -0.9579892 -1.2352245 -1.0285372
+ Z=1 -0.9155792 -1.0579546 -0.8949457 -0.9421799 -0.9844728
\end{verbatim}
\end{kframe}
\end{knitrout}