Closed hyunjimoon closed 5 months ago
S = 30, M = 1000 (vensim and stan would be different but non-autocorrelated, converged sample), N = 20
prior_pred_obs
Use alpha, beta, gamma, delta prior dist defined in draws2data stan file.
We assume stan's rng and vensim's rng is similar. In stan, prey_obs ~ normal_rng(prey, m_noise_scale)
prey_obs ~ normal_rng(prey, m_noise_scale)
array([ 0.24878059, 0.29612573, 0.55957889, 0.06677449, -2.04914881, -0.08381008, -0.82436614, 0.5243477 , -0.60570814, -0.37597002, -0.92898971, 0.0248358 , 0.60356123, -0.75828866, 0.12360369, 0.18310545, -0.37519184, -0.77519677, 0.07079331, 0.17829731])
Compare prey_obs, predator_obs
prey_obs
predator_obs
Consistency of realized random variable should be matched. Lookup function (CDF) is the right way to go. make sure np.random.normal(0,1, size=n_t) is used
np.random.normal(0,1, size=n_t)
@tomfid updated result (uploaded in stanify repo); surprising process noise makes estimation stable.
S = 30, M = 1000 (vensim and stan would be different but non-autocorrelated, converged sample), N = 20
without process noise, with measurement noise
prior_pred_obs
: https://github.com/Data4DM/stanify/blob/main/stanify_demo.py#L47Use alpha, beta, gamma, delta prior dist defined in draws2data stan file.
We assume stan's rng and vensim's rng is similar. In stan,
prey_obs ~ normal_rng(prey, m_noise_scale)
Compare
prey_obs
,predator_obs
estimate for without process noise
with process noise, with measurement noise
Consistency of realized random variable should be matched. Lookup function (CDF) is the right way to go. make sure
np.random.normal(0,1, size=n_t)
is used