Amplitude transfer function Given a LTI-system  $$y[n]=x[n]-2x[n-1]+y[n-1]- \frac{8}{9}y[n-2]$$
The transfer function $H(z)$ is:
$$H(z) = \frac{1-2z^{-1}}{1-z^{-1}+ \frac{8}{9} z^{-2}} $$
How do I calculate the amplitude transfer function so I can plot a Bode diagram like this? (in hand, not in MATLAB)

I thought that I should substitue $z=e^{j\omega}$ in $H(z)$, but it doesn't seem to be right. I hope you guys can help me out.
There are many algebraic paths to get into the required expression some of them being long and tedious, while the others being shorter with a carefully choosen route.

Given :
$$H(z) = \frac{ 1 - 2z^{-1} }{1 - z^{-1} + \frac{8}{9}z^{-2} }$$

To evaluate the corresponding Bode-Plot, by hand, we need to first derive the expression called as the Frequency Spectrum Magnitude $\lvert H(e^{j\omega})\rvert$ of $H(z)$, provided that the system is stable (i.e.all poles of $H(z)$ inside unit circle) And then compute:

$$20\log_{10}\left(\lvert H(e^{j\omega})\rvert\right),$$ 
to get the Magnitude in dB scale. 

Let's proceed into the first step and plug $e^{j\omega}$ into $H(z)$ to get Frequency Response:
$$H(e^{j\omega}) = \frac{ 1 - 2e^{-j\omega} }{1 - e^{-j\omega} + \frac{8}{9}e^{-2j\omega} }$$

As this is a complex valued rational fraction expression, it is equal to:
$$H(e^{j\omega}) = \frac{P(e^{j\omega})}{Q(e^{j\omega})}$$

And from complex algebra, the magnitude of $H(e^{j\omega})$ is equivalent to:
$$ \lvert H(e^{j\omega})\rvert = \frac{\lvert P(e^{j\omega})\rvert}{\lvert Q(e^{j\omega})\rvert}$$

Hence we need to compute the absolute values of the numerator and denumerator expressions, where the absolute value of a complex number is understood as: $$z=a+jb \implies \lvert z\rvert=(a^2+b^2)^{0.5}$$

Lets elaborate the Numerator:
\begin{align}
P(e^{j\omega}) &amp;= 1 - 2e^{-j\omega} = \left(1-2\cos(\omega)\right) + j\left(2\sin(\omega)\right)\\
\lvert P(e^{j\omega})\rvert &amp;= \left[\left(1-2\cos(\omega)\right)^2 + \left(2\sin(\omega)\right)^2\right]^{0.5}\\
\lvert P(e^{j\omega})\rvert &amp;= \left[1+4\cos^2(\omega)-4\cos(\omega) + 4\sin^2(\omega)\right]^{0.5}\\
\lvert P(e^{j\omega})\rvert &amp;= \left[5-4\cos(\omega)\right]^{0.5}\\
\end{align}

Also elaborate the Denumerator (Denominator I mean!):
\begin{align}
Q(e^{j\omega}) &amp;= 1 - e^{-j\omega} + \frac 89 e^{-2j\omega} = e^{-j\omega} \left(e^{j\omega} - 1 + \frac 89 e^{-j\omega}\right)\\
\lvert Q(e^{j\omega})\rvert&amp;=\lvert e^{-j\omega}\rvert\cdot \bigg\lvert \left(e^{j\omega} - 1 + \frac 89 e^{-j\omega}\right)\bigg\rvert\\
\lvert Q(e^{j\omega})\rvert&amp;=\bigg\lvert \left(e^{j\omega} - 1 + \frac 89 e^{-j\omega}\right)\bigg\rvert\\
\lvert Q(e^{j\omega})\rvert&amp;=\left[\left(\cos(\omega) - 1 + \frac 89 \cos(\omega)\right)^2 + \left(\sin(\omega) - \frac 89\sin(\omega)\right)^2\right]^{0.5}\\
\lvert Q(e^{j\omega})\rvert&amp;=\left[\left(\frac{17}{9}\cos(\omega) - 1\right)^2 + \left(\frac 19 \sin(\omega)\right)^2\right]^{0.5}\\
\end{align}

As there seems no more useful simplifications, we can deduce $\lvert H(e^{j\omega})\rvert$ as:
$$\lvert H(e^{j\omega})\lvert = \frac{\left[5-4\cos(\omega)\right]^{0.5}}{\left[\left(\frac{17}{9}\cos(\omega) - 1\right)^2 + \left(\frac 19\sin(\omega)\right)^2\right]^{0.5}}$$

The Bode plot takes the logarithm of this to produce the graph:
$$\begin{align} \lvert H(e^{j\omega})\rvert_\text{dB} &amp; \triangleq 20 \log_{10}\left(\lvert H(e^{j\omega})\rvert\right) \\
&amp; = 20 \log_{10}\left(\frac{\left[5-4\cos(\omega)\right]^{0.5}}{\left[\left(\frac{17}{9}\cos(\omega) - 1\right)^2 + \left(\frac 19\sin(\omega)\right)^2\right]^{0.5}}\right)\\ 
&amp; = 10 \log_{10}\left(\frac{5-4\cos(\omega)}{\left(\frac{17}{9}\cos(\omega) - 1\right)^2 + \left(\frac 19\sin(\omega)\right)^2}\right) \\ 
&amp; = 10 \log_{10}\left(5-4\cos(\omega)\right) - 10 \log_{10}\left(\left(\tfrac{17}{9}\cos(\omega) - 1\right)^2 + \left(\tfrac 19\sin(\omega)\right)^2\right)\\ 
\end{align}$$  

Which produces the same graph when compared with freqz([1 -2],[1 -1 8/9]) function of MATLAB to produce discrete time frequency response plot, for a linear frequency axis. In discrete time it is customary to use linear frequency axis rather than a logarithmic one as usual in continuous time Bode-Plots.