Is there a discontinuous derivative if we marginalize out
the change point?
There was some discussion of moving to a continuous change
point, but I think that's where you get the discontinuous derivative
right? I don't think that helps --- it would just be one of those
cases where we devolved to a truly random walk (might not be
too bad since there are only two directions in which to walk here).
- Bob
On Jul 2, 2014, at 3:34 PM, Andrew Gelman <
gel...@stat.columbia.edu> wrote:
> Hi all. I generally don't like change point models because it's my impression that real life does not usually have sudden changes--and when sudden changes exist, we usually know when they happen.
>
> But, setting those qualms aside, the model seems well-enough specified. I see the potential HMC problem, though, as there is a discontinuous derivative. One way to handle this would be to allow the change to be continuous, which in some way is an application of the folk theorem in that I expect actual changes really are continuous.
>
> Beyond this, we (Stan-dev, that is) might want to think more generally about how to patch models that have bits of discontinuity so they work ok in HMC. Maybe we can map to some latent continuous model?
>
> A
>
>> Has anybody fitted a change point model in Stan, please?
>>
>> We are interested to fit a change point (broken stick) model in RStan to model longitudinal continuous outcomes measured about three to ten times (at baseline and follow-ups) for each of about hundreds of subjects (i.e. patients in a clinical trial); (So this is different from a time series on a single outcome for a single unit of observation, say a NYSE stock.). The timing of the outcome observations is different for each individual (the patients come in for appointments at different, irregularly), as are the slopes before and after the change point, the intercept and the actual change point itself.
>>
>> The model:
>>
>> y[i,k] = beta[pre, i] * (t[i, k] - tau[i]) * I(t[i, k] < tau[i]) + beta[intercept, i]+ beta[post, i] * (t[i,k] - tau[i]) * I(t[i,k] > tau[i]) + epsilon[i,j]
>>
>> where the error term epsilon [i,k] ~MVN (0, Sigma), iid;
>>
>> y[i,j,t] is the continuous outcome of the ith subject at the kth observation at time t[i,k]; beta[pre,i] is the random slope for each subject before, beta[post,i] is the random slope for each subject after the subject specific change point tau. We think a reasonable prior for beta may be ~MVN, iid, but the slopes and intercept are certainly not iid.
>>
>> I( t[i,k] > tau[i]) is the indicator function used to define a linear spline: (t[i, k] - tau[i]) * I(t[i, k] < tau[i]) = t[i,k] - tau[k] iff t[i,k] < tau[i] ; 0 otherwise;
>>
>> tau [i] is the random change point (to be estimated for each subject i); tau [i] is the time of the 'kink' in the spline measured before say a diagnosis of dementia.;
>>
>> See for example attached: Hall CB, Ying J, Kuo L, Sliwinski M, Buschke H, Katz M, Lipton RB. Estimation of bivariate measurements having different change points, with application to cognitive ageing. Stat Med. 2001 Dec 30;20(24):3695-714. PubMed PMID: 11782027.
>>
>> We are interested to learn from similar models other users may have fitted or know about or to share related functions, now possible in Rstan.
>>
>> Thank you.
>>
>> Michael Andreae
>
>
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
stan-users+...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
>
>