Displaying 1 result from an estimated 1 matches for "mu_acc_p".
2013 Aug 27
1
Error in simulation. NAN
...model with R and c++.
I have a strange problem. I can't reproduce the error with a small
script and then i post the original one.
The problem is after the line
for(MCMC_iter2=0;MCMC_iter2<thin;MCMC_iter2++)
For the first 34 iterations all work fine, after, all the simulations
of mu_acc_P return an "nan". If i delete the line
alpha_acc_P[0] = rnorm(app1_3,sqrt(app1_4) );
the simulations of mu_acc_P work fine. For me it is really strange,
Thanks!.
#include <iostream>
#include <string>
using namespace std;
#include <R.h>
#include <Rinternals.h>...