Hi
I'm trying to infer parameters of a time series model with hidden states, and I would like to know if it's possible to avoid estimating the hidden states themselves.
A toy example of how I've done it so far, which includes the hidden states, is the following
data {
int T;
vector[T] y; // observations
real dt; // time step for SDE
}
parameters {
vector[T] x; // hidden states
real a; // parameter I'm interested in
real sig;
real eps;
}
model {
for (t in 2:T)
x[t] ~ normal(x[t-1] + dt*(a*x[t-1] - x[t-1]^3), sig*sqrt(dt));
y ~ normal(1/(1 - exp(-x)), eps);
}
And this works quite well, but for the real model I want to use, there's not 1 hidden state variable but tens or hundreds, the observation model is a general linear mixture and aside from making the inference quite slow, I'm worried it reduces the quality of the estimates (though I'm quite new to Stan & MCMC so maybe that's unfounded). The only trick I've come up with so far is to thin the number of time points being estimated.
Can anyone offer some pointers or critiques here? Any remarks on SDEs in Stan/MCMC in general would also be welcome.
Cheers,
Marmaduke