\documentclass[11pt]{article}
\usepackage{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage{epsfig}
\topmargin-.5in
\textwidth6.6in
\textheight9in
\oddsidemargin0in
\def\ds{\displaystyle}
\def\d{\partial}
\def\bH{{\bf H}}
\def\bM{{\bf M}}
\def\bB{{\bf B}}
\def\bm{{\bf m}}
\def\bS{{\bf S}}
\def\ve{{\varepsilon}}
%\def\fs{\scriptsize}
\def\fs{\footnotesize}
\def\reals{\mathbb{R}}
\def\complex{\mathbb{C}}
\def\scriptO{{{\it O}\kern -.42em {\it `}\kern + .20em}}

\begin{document}

\centerline{\large \bf Math 540: Project 4}

\bigskip
\noindent
Due Tuesday, April 3

\bigskip
\noindent
1. Consider the SIR model
$$
\begin{array}{lcl}
  {\ds \frac{d S}{d t} = \delta N - \delta S - \gamma IS} & , & S(0) =  900, \\
  \noalign{\medskip}
  {\ds \frac{d I}{d t} = \gamma IS - (r + \delta) I}  & , & I(0) = 100, \\
  \noalign{\medskip}
  {\ds \frac{d R}{d t} = r I - \delta R} & , & R(0) = 0
\end{array}
$$
from Project 3, where $\gamma, r$ and $\delta$ are each in the interval $[0,1]$.  

\begin{description}
 \item{(a)} Consider  the file \texttt{SIR.txt}, which contains times $t_j$ in the first column and corresponding values $I(t_j)$ in the second, and the parameters $q =  [\gamma, r, \delta]$.  Employ DRAM to compute and plot chains, marginal densities, and pairwise plots for the parameters.  You should use \texttt{s2chain} to additionally estimate the observations variance $\sigma^2$.  You can use the covariance matrix $V$, which you estimated in Project 3, as input.  How do the mean parameter values compare to the OLS estimates that you computed using \texttt{fminsearch.m}?  How does the final adapted covariance matrix compare to your initial estimate $V$?   Plot the marginal densities and sampling distributions in the same figures and discuss your results.  Finally, how does the variance estimate $\sigma^2$ computed by DRAM compare to your OLS estimate?
 
 \item{(b)} Using the DRAM commands \texttt{mcmcpred} and \texttt{mcmcpredplot}, construct 95\% credible and prediction intervals for each of the states.  Do your results appear to be reasonable?
 
 \item{(c)} Now consider the model
 $$
\begin{array}{lcl}
  {\ds \frac{d S}{d t} = \delta N - \delta S - \gamma k IS} & , & S(0) =  900, \\
  \noalign{\medskip}
  {\ds \frac{d I}{d t} = \gamma k IS - (r + \delta) I}  & , & I(0) = 100, \\
  \noalign{\medskip}
  {\ds \frac{d R}{d t} = r I - \delta R} & , & R(0) = 0
\end{array}
$$
 non-identifiable parameter set $q = [\gamma, r, \delta, k]$.  Run DRAM and plot the pairwise distributions.  Are your chains converging?  Can you use the Bayesian analysis to establish that the parameters are not mutually identifiable?
 \end{description}
 
\vfill\eject
 \noindent
 2. Consider the Helmholtz energy
 $$
  \psi(P,q) = \alpha_1 P^2 + \alpha_{11}P^4 + \alpha_{111}P^6
$$
from Project 3, where $P$ is the polarization on the interval $[0,0.8]$ and $q = [\alpha_1, \alpha_{11}, \alpha_{111}]$ are parameters. 
 
 \begin{description}
 \item{(a)} Using the data in the file \texttt{Helmholtz.txt}, which contains polarization values $P_j$ in the first column and energies $\psi(P_j)$ in the second, employ DRAM to compute chains, marginal densities, and pairwise plots for the parameters.  Please report your parameter estimates and observation variance $\sigma^2$.  Discuss the correlation of the parameters and why the global sensitivity analysis techniques in Project 2 are not applicable.  
 
  \item{(b)} Using the DRAM commands \texttt{mcmcpred} and \texttt{mcmcpredplot}, construct 95\% credible and prediction intervals for the energy and discuss your results.
 
 \item{(c)} Now repeat (a) using the Random Walk Metropolis Algorithm 8.5.  How do these results compare to DRAM?
  
 \end{description}

\end{document}

