Hello to everyone,
I am trying to fit a model where my data T can be written as follows:
if T>0 T | pars ~ AFT
if T<0 -T | pars ~ AFT
I am overcoming this sign issue in the following way:
T = D*delta + (delta-1)*A
where delta is 1 if T>0, 0 otherwise and consequently D = T (T>0) and A = -T (T<0).
In this way I have both D and A positive variables and I can fit AFT models for them. Delta is basically a Bernoulli variable and so I am fitting a logit-regression for it.
Now the problem in Stan: should I write the three models in the same Stan file? To me they seem to be quite independent from the parameter posterior sampling point of view, so maybe put the three of them in the same huge model could just make life harder to Stan? Or it would be the same from a point of view of efficiency of the sampling?
In the case of doing just one big model, I can just using a sampling expression for each of D, A and delta or it would be more efficient to add them with the
target += statement?