\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{nstrata}\hlkwb{<-}\hlnum{5}
\hlstd{ps.quint.true}\hlkwb{<-}\hlkwd{quantile}\hlstd{(ps.true,}\hlkwc{probs}\hlstd{=}\hlkwd{seq}\hlstd{(}\hlnum{0}\hlstd{,}\hlnum{1}\hlstd{,}\hlkwc{by}\hlstd{=}\hlnum{1}\hlopt{/}\hlstd{nstrata))}
\hlstd{ps.quint.true}
\end{alltt}
\begin{verbatim}
+        0%       20%       40%       60%       80%      100% 
+ 0.2126362 0.5120989 0.5914952 0.6715642 0.7601679 0.9762403
\end{verbatim}
\begin{alltt}
\hlstd{ps.strat.true}\hlkwb{<-}\hlkwd{as.numeric}\hlstd{(}\hlkwd{cut}\hlstd{(ps.true,ps.quint.true,}\hlkwc{include.lowest}\hlstd{=}\hlnum{TRUE}\hlstd{))}
\hlkwd{table}\hlstd{(Z,ps.strat.true)}
\end{alltt}
\begin{verbatim}
+    ps.strat.true
+ Z     1   2   3   4   5
+   0 120  95  73  46  29
+   1  80 105 127 154 171
\end{verbatim}
\end{kframe}
\end{knitrout}