I have encountered the ‘Error in sampler$call_sampler(args_list[[i]]) : Initialization failed’. But not sure how to figure out exactly what went wrong. How can I get more details on the error? Any help is appreciated!

```
data {
int<lower=0> J;
real<lower=0> t[J];
int<lower=0> n;
real adt[n];
real evt[n];
real alpha0;
real beta0;
}
transformed data{
real<lower=0> delta_t[J];
delta_t[1] = t[1];
for (j in 2:J){
delta_t[j]=t[j]-t[j-1];
}
}
parameters {
vector[J] lambda;
}
model {
for (j in 1:J) lambda[j] ~ gamma(alpha0, beta0);
for (i in 1:n){
target += -lambda[1]*delta_t[1]*(adt[i] >= t[1]) +
log1m_exp(-lambda[1]*delta_t[1])*(adt[i]<=t[1] && evt[i]==1);
}
for (j in 2:J){
for (i in 1:n){
target += -lambda[j]*delta_t[j]*(adt[i] >= t[j]) +
log1m_exp(-lambda[j]*delta_t[j])*(t[j-1]<adt[i] && adt[i]<=t[j] && evt[i]==1);
}
}
}
```

R code:

mydata_mod ← list(

J = J,

t = myt,

n = n,

adt = adt,

evt = evt,

alpha0 = 1/1000,

beta0 = 48/log(2)/1000

)

fit ← sampling(sm,

data = mydata_mod, # named list of data

# seed=1234,

chains = 1, # number of Markov chains

warmup = 1000, # number of warmup iterations per chain

iter = 2500, # total number of iterations per chain

cores = 2, # number of cores (could use one per chain)

refresh = 0 # no progress shown

)