Assignment 5 - hints


For question 3, work through the following steps
  1. Complete the sampling model by making a reasonable assumption for 'eps[t]', e.g., 'eps[t] ~ N(0,sig^2)', i.i.d.
  2. assume an appropriate prior probability model;
  3. find the joint posterior distribution 'p(theta | data)' for 'theta=(w1,w2,a1,b1,a2,b2,sigma)'
  4. Assume 'sigma' fixed at some reasonable value (keeping it unknown with an appropriate prior does not introduce any major complication either).
  5. 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.
  6. 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

  1. 'm[t] = E(theta[t] | D[t])' given on page 112 of West & Harrison, and
  2. 'a_T[-k] = E(theta[T-k] | D[T])' given on page 117 of West & Harrison,
  3. 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.