
\begin{appendices}

\chapter{Metropolis-Hastings algorithm for estimating the dispersion parameter in the generalized Poisson model. }  

Let 
\[
y=log\left(\frac{\alpha-l}{u-\alpha}\right)
\]
 such that $Y$ could take a normal prior with parameter space covering$\left(-\infty,\:+\infty\right).$
Since $\alpha\leftrightarrow y$ is one-to-one monotonic transformation,
we can derive the pdf of $Y$ as:

\[
F_{Y}(y)=Pr\left[log\left(\frac{X-l}{u-X}\right)\leq y\right]=Pr\left[X\leq\frac{l+ue^{y}}{1+e^{y}}\right]
\]


\noindent by taking derivative, we have 

\[
f_{Y}(y)=f_{X}\left(\frac{l+ue^{y}}{1+e^{y}}\right)\frac{d}{dy}\left(\frac{l+ue^{y}}{1+e^{y}}\right)
\]


\noindent where since $X$ follows a uniform distribution, $f_{X}(.)=\frac{1}{u-l}$.
So we have

\[
f_{Y}(y)=\frac{1}{u-l}\times\frac{e^{y}\left(u-l\right)}{\left(1+e^{y}\right)^{2}}=\frac{e^{y}}{\left(1+e^{y}\right)^{2}}
\]


To provide MCMC updates by componentwise Metropolis-Hastings (M-H)
algorithm, we generate new values of $\alpha^{'}$ through target
distribution of $Y^{'}\sim N(y,\,\sigma^{2})$. $f_{Y}(y)$ will be
factored to provide the MCMC acceptance ratio calculation.

\end{appendices}