Hello all,
consider the following simple linear model with a quadratic term:
logit(y) = b0 + b1 * x[1] + b2 * x[2] + b3 * x[2]^2
I would like to use reversible jump to evaluate the entire quadratic part of the model with a single indicator something like:
logit(y) = b0 + ind[1] *
b1 * x[1] + ind[2] * b2 * x[2] + ind[3] * ( b3 * x[2] + b4 * x[2]^2)
where ind[i] are the reversible jump indicator variables, and i have added another b coefficient in order to evaluate the linear x[2] (b2) term separately from the quadratic x[2] (b3 and b4) terms.
I have made a few attempts to run this with some data but the problem that I am running into is that ind[3] can only be connected to one of b3 or b4, so if say I set b3 as the target for ind[3], then b4 uses a standard sampler and is likely to drift when ind[3] is turned off by the model (this seems to be the case when I run such a model with data).
So I am wondering if anyone has any ideas on how to build this model where both b3 and b4 are tied to ind[3] and will stop sampling when ind[3] is switched off. Also, I think I understand how the indicators and targets work with nimble's reversible jump sampler.. but I recognize I might be missing/misunderstanding something.
very grateful for any help,
Brian