The second series is where we start running into issues. We are assuming a uniform transfer function between two values, a and b, so that the value of the second series at time t, Y2[t], is the mean of the first time series between times t-a and t-b, with some other constants for variability and shift (eta and C).
The equation is:
Y2[t] = eta * ( (1 / N) * SUM(Y[t - a] : Y[t - b]) + C ), where N is the number of values in the summed interval.
The problem we are having is summing over the correct range of Y1. STAN doesn't allow subsets (as far as I can tell), so I have used an if() ... control flow to go through every Y1 value and check if the time value, t, is in the required interval.
pairs(stan.fit, pars = c("alpha", "beta", "mu", "b", "k", "eta", "C", "lp__"))
Hi Ben, here's the ouput from the pairs plot.
There's nothing weird here -- with Y2[t] well-constrained we would expect eta \approx 1 / C which is exactly what is seen in the plot. My guess is that the prior on C is too weak and it's growing to the point of dominating the SUM(Y[t - a]: Y[t - b]) / N contribution. A stronger prior pushing C towards zero may help.
alpha ~ beta(20,1)
I tried giving C a much narrower prior and this seems to have stopped it from roaming around so much and instead hang around 5 which is what it is when we use the full arp151 data set. Other than this I'm not sure on an alternative prior for C.