Hello

I read a marketing paper on nonrandom marketing mix (attached). The authors estimated the model using MCMC successfully. The authors actually provide the data within the *bayesm* package (accessible thru here). But the MCMC code is not provided.

My reproduction Stan code works for the conditional model (attached). But Stan does not work for the full model(attached). Can someone offer suggestion, or is it the kind of model that Stan cannot handle?

The conditional model is

y[i,t] ~ NBD(b0[i] + b1[i] * Det[i,t] + b2[i] * ln(y[i,t-1]+1), phi)

from eqn (1) and (3) of the paper. This is a typically hierarchical NBD with random slopes.

The full model is the conditional model *plus*

Det[i,t] ~ Poisson (a0 + a1 * b0[i]/(1-b2[i]) + a2 * b1[i]/(1-b2[i]))

from eqn (7) and (8) of the paper. This is innovative part of the paper. The full model is a joint model on the outcome and a predictor, and the authors argue the predictor is nonrandom. The authors assumes a interpretable relationship between the predictor value and the individual slopes from the conditional model to account for the non-randomness. They argue that if a1 and a2 are 0, there would be randomness.

The output for the full model using my code after 2000 iterations is:

Warning messages:

1: There were 1733 divergent transitions after warmup. Increasing adapt_delta above 0.8 may help.

2: There were 749 transitions after warmup that exceeded the maximum treedepth. Increase max_treedepth above 10.

3: There were 1 chains where the estimated Bayesian Fraction of Missing Information was low.

4: Examine the pairs() plot to diagnose sampling problems

All the traceplots are terrible and there is no mixing at all. Any suggestion would be fully appreciated!

Response_modeling_with_nonrandom_marketi.pdf (333.9 KB)long_nbd_mvn.stan (1.7 KB) long_nbd_mvn_poi.stan (2.0 KB) run_code.r (2.2 KB)