\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{fmods}\hlkwb{<-}\hlkwd{formula}\hlstd{(SmokeNow}\hlopt{~}\hlstd{Gender}\hlopt{+}\hlstd{Age}\hlopt{+}\hlstd{Race3}\hlopt{+}\hlstd{Education}\hlopt{+}\hlstd{MaritalStatus}\hlopt{+}\hlstd{HHIncome}\hlopt{+}\hlstd{Poverty)}
\hlstd{ps.mod} \hlkwb{<-} \hlkwd{glm}\hlstd{(fmods,}\hlkwc{data}\hlstd{=small.nhanes,}\hlkwc{family}\hlstd{=}\hlstr{"binomial"}\hlstd{)}
\hlstd{ps.lr} \hlkwb{<-} \hlkwd{predict}\hlstd{(ps.mod,}\hlkwc{type}\hlstd{=}\hlstr{"response"}\hlstd{)}
\hlstd{ps0}\hlkwb{<-}\hlstd{ps.lr[Smoke}\hlopt{==}\hlnum{0}\hlstd{];ps1}\hlkwb{<-}\hlstd{ps.lr[Smoke}\hlopt{==}\hlnum{1}\hlstd{]}
\hlstd{quints} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{0}\hlstd{,}\hlkwd{quantile}\hlstd{(ps.lr,}\hlkwd{seq}\hlstd{(}\hlnum{.2}\hlstd{,}\hlnum{1}\hlstd{,}\hlnum{.2}\hlstd{)))}
\hlkwd{rbind}\hlstd{(}\hlkwd{table}\hlstd{(}\hlkwd{cut}\hlstd{(ps.lr[Smoke}\hlopt{==}\hlnum{0}\hlstd{],quints)),}\hlkwd{table}\hlstd{(}\hlkwd{cut}\hlstd{(ps.lr[Smoke}\hlopt{==}\hlnum{1}\hlstd{],quints)))}
\end{alltt}
\begin{verbatim}
+      (0,0.222] (0.222,0.34] (0.34,0.481] (0.481,0.639] (0.639,0.941]
+ [1,]       231          194          167           121            69
+ [2,]        47           82          105           157           204
\end{verbatim}
\end{kframe}
\end{knitrout}