Does Stan have an equivalent command to convolve(x, y, type='open')? I have been unable to find one.
--
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+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
Depending on the details of the problem you could abuse the ode solver to do the integration...just a thought.
Sebastian
This wasn't enough for me to understand the function:
each column is the response function shifted by a different amount
for each column.
Can you define convolve() as a function in Stan itself? If
so, it'll be easy for us to add to the language itself.
- Bob
> On Jan 15, 2017, at 8:05 PM, Mike Lawrence <mike....@gmail.com> wrote:
>
> I believe that the purpose to which convolve was used in that model was merely to prepare the predictor matrix. You can create that matrix yourself outside Stan, where each column is the response function shifted by a different amount for each column. You then do a standard regression and the weights associated with each column reflect the evidence for a pulse at the time-point corresponding to the shift of that column.
>
> --
> Mike Lawrence
> Graduate Student
> Department of Psychology & Neuroscience
> Dalhousie University
>
> ~ Certainty is (possibly) folly ~
>
> On Sun, Jan 15, 2017 at 4:16 PM, Jon Fawcett <jmfa...@gmail.com> wrote:
> Dear User Group,
>
> I am trying to fit a model in Stan that views a particular time-series as arising from the convolution of several “pulses” of varying strength along with a particular response function. As a starting point, I am interested in recreating the analysis reported here by another research tea, (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3365158/) with original scripts in R provided here (http://www.pnas.org/content/suppl/2012/05/11/1201858109.DCSupplemental/sd02.txt and http://www.pnas.org/content/suppl/2012/05/11/1201858109.DCSupplemental/sd03.txt). I have an intuition as to how I should proceed, but a critical step in the original R calculations involves the command:
>
> convolve(i,rev(h),type="open")
>
> Where i represents the pulses and h represents the response function. Does Stan have an equivalent command to convolve(x, y, type='open')? I have been unable to find one.
>
> Cheers!
> Jon
>
> --
> 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+unsubscribe@googlegroups.com.
> To post to this group, send email to stan-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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+unsubscribe@googlegroups.com.
> To post to this group, send email to stan-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.