Assignment 3: Non-linear State Space Models

Due Th Oct 5.

Some Hints .

Consider the following general state space models:
Model I:
 y[t] = x[t]+v[t],                      v[t] ~ N(0,V)
 x[t] = x[t-1]*exp(a+b*x[t-1]) + u[t],  u[t] ~ N(0,W[t])

Model II: (almost) the same in log's; X[t]=log x[t]
 y[t] = exp(X[t])+v[t]                      v[t]~N(0,V)
 X[t] = X[t-1] + a + b*exp(X[t-1]) + u[t]   u[t]~N(0,W)
 X[0] ~ N(m0,C0), 
Both models are completed with a prior on a,b,V,W:
	p(a,b) = N(a; 0,1)*N(b; 0,1) 
(i.e., independent standard normals). Start the discussion with an IG prior on V and W; but for the implementation
	fix V,W at V=1, W=0.01.
Also, use m0=2, C0=1.
Please develop an MCMC (Gibbs sampling) approach to implement inference in the two models. Your discussion should include:
  1. write out the joint distribution of all par's and data:
    	p(x[1..T],a,b,y[1..T],V,W) \propto ...
    
  2. Based on the joint distribution, find all the relevant complete conditionals:
    	p(x[t] | x[-t],a,b,V,W,y) \propto ...		t=1..T
    	p(a,b  | x,V,W,y)         \propto ...
    	p(V    | x,a,b,W,y)       \propto ...
    	p(W    | x,a,b,V,y)       \propto ...
    
    Hint: except for p(x[t]|...) all conditionals take the form of some well-known distribution.
  3. Propose some efficient method for updating x[t].
    Hint: look at the expression for p(x[t] | ...). If you ignore one of the factors you can recognize it as a normal distribution with certain moments. Use that normal distribution to define a rejection sampling algorithm to sample from p(x[t] | ...).
  4. Implement the MCMC for Model II (*or* model I, no need to implement both models).
    You could use R, Splus, or BUGS, or whatever you are familiar with. I can help you in R and Splus, but know little about BUGS. On the other hand, implementing it in BUGS is probably easiest! All you have to do is to write down the model, and BUGS will do the rest for you.
I have simulated some data (from Model II). Good starting values for the par's are: a= 0.1, b= -0.01.

Please work together in groups! If you (the students registered in this class) work in one group, that's fine with me too. But please make sure that everyone knows what you are doing. Please hand in your write-up by Th Oct 5th.

References: