\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{ps.lr.weight} \hlkwb{<-} \hlstd{Smoke}\hlopt{/}\hlstd{ps.lr} \hlopt{+} \hlstd{(}\hlnum{1}\hlopt{-}\hlstd{Smoke)}\hlopt{/}\hlstd{(}\hlnum{1}\hlopt{-}\hlstd{ps.lr)}
\hlkwd{mean}\hlstd{(Smoke}\hlopt{*}\hlstd{Y}\hlopt{*}\hlstd{ps.lr.weight)} \hlopt{-}\hlkwd{mean}\hlstd{((}\hlnum{1}\hlopt{-}\hlstd{Smoke)}\hlopt{*}\hlstd{Y}\hlopt{*}\hlstd{ps.lr.weight)}  \hlcom{#IPW0}
\end{alltt}
\begin{verbatim}
+ [1] -1.928655
\end{verbatim}
\begin{alltt}
\hlkwd{coef}\hlstd{(}\hlkwd{lm}\hlstd{(Y} \hlopt{~} \hlstd{Smoke,} \hlkwc{weights} \hlstd{= ps.lr.weight))[}\hlnum{2}\hlstd{]}              \hlcom{#IPW}
\end{alltt}
\begin{verbatim}
+     Smoke 
+ -1.991233
\end{verbatim}
\end{kframe}
\end{knitrout}