\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{w}\hlkwb{<-}\hlstd{w0}\hlopt{+}\hlstd{w1}
\hlstd{fit.wls}\hlkwb{<-}\hlkwd{lm}\hlstd{(Y}\hlopt{~}\hlstd{Z,}\hlkwc{weights}\hlstd{=w)}
\hlkwd{round}\hlstd{(}\hlkwd{coef}\hlstd{(}\hlkwd{summary}\hlstd{(fit.wls)),}\hlnum{6}\hlstd{)}
\end{alltt}
\begin{verbatim}
+              Estimate Std. Error  t value Pr(>|t|)
+ (Intercept)  4.488312   0.037154 120.8032        0
+ Z           -1.965355   0.052740 -37.2648        0
\end{verbatim}
\end{kframe}
\end{knitrout}