\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{tabUnmatched} \hlkwb{<-} \hlkwd{CreateTableOne}\hlstd{(}\hlkwc{vars} \hlstd{= vars,} \hlkwc{strata} \hlstd{=} \hlstr{"SmokeNow"}\hlstd{,} \hlkwc{data} \hlstd{= small.nhanes,} \hlkwc{test} \hlstd{=} \hlnum{FALSE}\hlstd{)}
\hlkwd{print}\hlstd{(tabUnmatched,} \hlkwc{smd} \hlstd{=} \hlnum{TRUE}\hlstd{)}
\end{alltt}
\begin{verbatim}
+                      Stratified by SmokeNow
+                       0             1             SMD   
+   n                     782           595               
+   Gender = male (%)     432 (55.2)    369 (62.0)   0.138
+   Age (mean (SD))     54.33 (16.52) 44.96 (15.11)  0.592
+   Race3 (%)                                        0.315
+      Asian               25 ( 3.2)     15 ( 2.5)        
+      Black               43 ( 5.5)     64 (10.8)        
+      Hispanic            26 ( 3.3)     38 ( 6.4)        
+      Mexican             45 ( 5.8)     35 ( 5.9)        
+      White              630 (80.6)    416 (69.9)        
+      Other               13 ( 1.7)     27 ( 4.5)        
+   Education (%)                                    0.512
+      8th Grade           59 ( 7.5)     33 ( 5.5)        
+      9 - 11th Grade      71 ( 9.1)    120 (20.2)        
+      High School        152 (19.4)    151 (25.4)        
+      Some College       256 (32.7)    210 (35.3)        
+      College Grad       244 (31.2)     81 (13.6)        
+   MaritalStatus (%)                                0.488
+      Divorced            85 (10.9)     77 (12.9)        
+      LivePartner         61 ( 7.8)     96 (16.1)        
+      Married            453 (57.9)    240 (40.3)        
+      NeverMarried       108 (13.8)    142 (23.9)        
+      Separated            6 ( 0.8)     14 ( 2.4)        
+      Widowed             69 ( 8.8)     26 ( 4.4)        
+   Poverty (mean (SD))  3.11 (1.65)   2.38 (1.58)   0.453
\end{verbatim}
\begin{alltt}
\hlstd{Smoke}\hlkwb{<-}\hlstd{small.nhanes}\hlopt{$}\hlstd{SmokeNow}
\hlstd{age0} \hlkwb{<-} \hlstd{small.nhanes}\hlopt{$}\hlstd{Age[Smoke}\hlopt{==}\hlnum{0}\hlstd{];age1} \hlkwb{<-} \hlstd{small.nhanes}\hlopt{$}\hlstd{Age[Smoke}\hlopt{==}\hlnum{1}\hlstd{]}
\hlstd{ecdf0} \hlkwb{<-} \hlkwd{ecdf}\hlstd{(age0); ecdf1} \hlkwb{<-} \hlkwd{ecdf}\hlstd{(age1)}
\hlkwd{par}\hlstd{(}\hlkwc{mar}\hlstd{=}\hlkwd{c}\hlstd{(}\hlnum{2}\hlstd{,}\hlnum{2}\hlstd{,}\hlnum{2}\hlstd{,}\hlnum{0}\hlstd{))}
\hlkwd{plot}\hlstd{(ecdf0,} \hlkwc{verticals}\hlstd{=}\hlnum{TRUE}\hlstd{,} \hlkwc{do.points}\hlstd{=}\hlnum{FALSE}\hlstd{,}\hlkwc{main}\hlstd{=}\hlstr{'Empirical cdfs for Age'}\hlstd{,}\hlkwc{col}\hlstd{=}\hlstr{'blue'}\hlstd{)}
\hlkwd{plot}\hlstd{(ecdf1,} \hlkwc{verticals}\hlstd{=}\hlnum{TRUE}\hlstd{,} \hlkwc{do.points}\hlstd{=}\hlnum{FALSE}\hlstd{,} \hlkwc{add}\hlstd{=}\hlnum{TRUE}\hlstd{,} \hlkwc{col}\hlstd{=}\hlstr{'red'}\hlstd{)}
\hlkwd{legend}\hlstd{(}\hlnum{20}\hlstd{,}\hlnum{0.9}\hlstd{,}\hlkwd{c}\hlstd{(}\hlstr{'Smoke = 0'}\hlstd{,} \hlstr{'Smoke = 1'}\hlstd{),}\hlkwc{col}\hlstd{=}\hlkwd{c}\hlstd{(}\hlstr{'blue'}\hlstd{,}\hlstr{'red'}\hlstd{),}\hlkwc{lty}\hlstd{=}\hlnum{1}\hlstd{)}
\end{alltt}
\end{kframe}

{\centering \includegraphics[width=\maxwidth]{figure/NH3-1} 

}



\end{knitrout}