Assignment 5 - hints
For question 3, work through the following steps
- Complete the sampling model by making a reasonable assumption for
'eps[t]', e.g., 'eps[t] ~ N(0,sig^2)', i.i.d.
- assume an appropriate prior probability model;
- find the joint posterior distribution
'p(theta | data)' for
'theta=(w1,w2,a1,b1,a2,b2,sigma)'
- Assume 'sigma' fixed at some reasonable value
(keeping it unknown with an appropriate prior
does not introduce any major complication either).
- Marginalize 'p(theta | data)' by integrating out
'(a1,b1,a2,b2)'.
Hint: regonize the integral as the marginal
distribution of 'y' under frequencies '(w1,w2)',
integrating out '(a1,b1,a2,b2)'. Do not solve the
integral from scratch by calculus.
- Voila, you now have the posterior 'p(w1,w2 | data)'
(including 'sigma' if you didn't fix that before).
Plot 'p(w1,w2|data)' as a bivariate contour plot.
Hint:
You will probably have to try several times until you find
a reasonable grid for '(w1,w2)'.
For question 4.4. use the recurrence relationships for
- 'm[t] = E(theta[t] | D[t])' given on page 112 of West & Harrison,
and
- 'a_T[-k] = E(theta[T-k] | D[T])' given on page 117 of West & Harrison,
- and note that 'mu[t]=F'theta[t]'.
Use Splus, R or matlab, or whatever is convenient for you to evaluate
the recursive equations and plot
'E(mu[t]|D[t]) = F'm[t]' and 'E(mu[t]|D[T]) = F'a_T[t-T]' against t.