<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\chapter{Results}
\label{ch:results}

\section{Experimental Results}



\textbf{Simulated a dataset with the following code below.  For this data $(\mathbf{y},\mathbf{X})$ implement the RJMCMC algorithm (with $\sigma_r = 0.2$) to a sample and using $N=100,000$ samples from the posterior.}

\begin{verbatim}
m=10;                                       
k=10;                                       
sigma0=.2;
sigmap=.3;
sigmar=.2;
n0=ceil(rand*m);                      
mub=ones(1,n0)*2;                     
b=normrnd(2,sigmap,n0,1);             
X=5*randn(k,m);
y=X(:,1:n0)*b+sigma0*randn(k,1);
\end{verbatim}


\newpage
\subsection{Histogram plots of several different runs}



Show a histogram of $n$ values visited by Markov chain.  This estimates the posterior probabilty, $f(n|\mathbf{y})$.



\begin{figure}[htb]
\includegraphics[scale=0.5]{plot1.png} 
\caption{Histogram: n=1}
\end{figure}
\begin{figure}[htb]
\includegraphics[scale=0.5]{plot2.png} 
\caption{Histogram: n=9}
\end{figure}
\newpage
\begin{figure}[htb]
\includegraphics[scale=0.5]{plot3.png} 
\caption{Histogram: n=8}
\end{figure}
\begin{figure}[htb]
\includegraphics[scale=0.5]{plot4.png} 
\caption{Histogram: n=4}
\end{figure}


\newpage
\subsection{Computation Times}
\begin{tabular}{l|l|}
\hline
$n=1$ &amp;481.608973 seconds
\\
\hline
$n=9$ &amp; 668.774289 seconds.
\\
\hline
$n=8$ &amp; 651.934132 seconds.
\\
\hline
$n=4$ &amp; 533.207485 seconds.
\\
\hline
\end{tabular}


\subsection{Table of Conditional Mean Estimates of $\mathbf{b}_n$}

For the $n$ value that is visited most often, find the conditional mean estimate of $\mathbf{b}_n$ under the density, $f(\mathbf{b}_n|\mathbf{y})$

\begin{tabular}{|c|c|c|c|}
\hline
$n$ &amp; $b$ &amp; $n$ &amp; $b$
\\
\hline
\\
1 &amp; 1.6652  &amp; 9 &amp; $\begin{matrix}
    \, \\
    2.4377 \\
    1.9074 \\
    1.8166 \\
    1.9085 \\
    2.1502 \\
    2.2462 \\
    1.8852 \\
    2.1858 \\
    2.1320 
  \end{matrix}$
\\
\hline
$n$ &amp; $b$ &amp; $n$ &amp; $b$
\\
\hline
8 &amp;  $\begin{matrix}
		\,	\\
    1.5613 \\
    1.8213 \\
    1.9352 \\
    2.0828 \\
    1.7574 \\
    2.0421 \\
    2.1864 \\
    1.7970 
\end{matrix}$ &amp; 4 &amp; 
$\begin{matrix}
	\,	\\
   2.0281 \\
    2.4511 \\
    2.0766 \\
    1.6940 \\
\end{matrix}$
\\
\hline
\end{tabular}

%============================================================================
</pre></body></html>