Zeitreihenanalyse - Aufgabe 4

From StatWiki
Jump to: navigation, search

Moving average filters

Apply both the simple MA filter with w_0=w_1=\frac 1 3\, and the more sophisticated MA filter with w_0=\frac 1 2, w_1=\frac 1 3, w_2=-\frac{1}{12}\, to the log GDP and compare the results.

Apply both the simple MA filter with w_0=w_1=\frac 1 5\, and the Spencer filter to the log GDP and compare the results.

> pdf(rpdf, width=8, height=8)
> gdpa=readdataSK("GDPA.csv", "csv")
> gdpa=data.frame(year=as.numeric(substr(gdpa$DATE,1,4)), gdp=gdpa$VALUE)
> gdpa=subset(gdpa, year>=1946)
> GDP.ts=ts(gdpa$gdp, start=1946)
> GDP.ls <- log(GDP.ts)
>
> par(mfrow=c(2,2))
>
> plot(filter(GDP.ls, c(1/3,1/3)), col=2, main="w=(1/3,1/3)")
> plot(filter(GDP.ls, c(1/2,1/3,-1/12)), col=3, main="w=(1/2,1/3,-1/12)")
>
> plot(filter(GDP.ls, c(1/5,1/5)), col=2, main="w=(1/5,1/5,1/5)")
> #points(GDP.ls*3/5)
>
> plot(filter(GDP.ls, c(74, 67, 46, 21, 3, -5, -6, -3)/320), col=3, main="Spencer")
>
> #points(GDP.ls*sum(c(74, 67, 46, 21, 3, -8)/320))

Complex Numbers

(ii)


\begin{align}
\overline{z_1 z_2}
& = \overline{x_1 x_2 + i x_2 y_1 + i x_1 y_2 + i^2 y_1 y_2} \\
& = \overline{(x_1 x_2 - y_1 y_2) + i(x_2 y_1 + x_1 y_2)} \\
& = (x_1 x_2 - y_1 y_2) - i(x_2 y_1 + x_1 y_2) \\
& = (x_1 - i y_1) (x_2 - i y_2) \\
& = \overline{z_1} \overline{z_2}
\end{align}
\,

(iii)

 \overline{\overline{z_1}} = \overline{\overline{x_1 + i y_1}} = \overline{x_1 - i y_1} = x_1 - i y_1 = z_1 \,