Posterior distribution for parameters of Markov chain

44 Views Asked by At

I would like to ask you for assistance with problem I'm struggling with. I've already made my calculations and checked it again and again, but my simulations suggest that I've made something wrong.

We consider the following Markov chain $X = (X_i)^n_{i=0}$: $\forall i \in \{1,...,n\}\ \ X_i = a + b X_{i-1}+cX_{i-1}\epsilon_i$, where $X_0$ is a given parameter and $(\epsilon_i)_{i=1}^n$ are independent normal variables with mean 0 and constant variance $\sigma^2$.

The main goal is to calculate posterior distribution of the parameters under an assumption of priors: $$(a,b) \sim \mathcal{N}(\mu_A, \mu_B, \Bigg[ \begin{matrix} \sigma^2_A & 0 \\ o & \sigma^2_B \end{matrix} \Bigg])$$ $$c^2 \sim InvGamma(\alpha_0, \beta_0)$$

For $(a,b)$ we have $\rho(a, b | c^2, X) \propto \rho(X | a, b, c^2)\rho(a, b) \propto \prod_{i=1}^n \rho(X_i | a, b, c^2, X_{i-1})\rho(a, b)$.

I am afraid that I've made mistake here, because intuitively information about $X_i$ is stored also in $X_{i+1}$, not only in $X_{i-1}$.

Nevertheless, let us continue the considerations. $X_i | a, b, c^2, X_{i-1} \sim \mathcal{N}(a + b X_{i-1}, c^2 X_{i-1}^2 \sigma^2)$, so: $$\rho(a, b | c^2, X) \propto \prod_{i=1}^n exp(-\frac{1}{2 c^2 X_{i-1}^2 \sigma^2} (X_i - a - b X_{i-1})^2)exp(-\frac{1}{2 \sigma_A^2}(a - \mu_A)^2 - \frac{1}{2 \sigma_B^2}(b - \mu_B)^2 )$$

Fortunately, we can simplify it and write as a density of two-dimensional normal distribution, mostly because of proper prior choice.

Analogously: $$\rho(c^2 | a, b, X) \propto p(X|a, b, c^2) \rho(c^2) \propto $$ $$ \propto \frac{1}{c^{2(\alpha_0+1)}} \prod_{i=1}^n \frac{1}{\sqrt{2 \Pi \sigma^2} c X_{i-1}} exp(-\frac{1}{2 c^2 X_{i-1}^2 \sigma^2}(X_i - a - b X_{i-1})^2) exp(-\frac{\beta_0}{c^2}) $$.

This solution gives us $InvGamma$ posterior, but again computations suggest that this is wrong.

Thank all of you in advance for any help and suggestions.