--
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/groups/opt_out.
Hm, after some further reading (http://ppw.kuleuven.be/okp/_pdf/Tuerlinckx2004TECOT.pdf), it seems that the PDF is rather treacherous (see Eq 3), with parts that need numerical estimation on the fly. So possibly not a good project for the mathematically naive like myself :Op
On Saturday, June 22, 2013 10:25:32 PM UTC-3, Andrew Gelman wrote:
Hm, after some further reading (http://ppw.kuleuven.be/okp/_pdf/Tuerlinckx2004TECOT.pdf), it seems that the PDF is rather treacherous (see Eq 3), with parts that need numerical estimation on the fly. So possibly not a good project for the mathematically naive like myself :Op
On Saturday, June 22, 2013 10:25:32 PM UTC-3, Andrew Gelman wrote:
Hm, after some further reading (http://ppw.kuleuven.be/okp/_pdf/Tuerlinckx2004TECOT.pdf), it seems that the PDF is rather treacherous (see Eq 3), with parts that need numerical estimation on the fly. So possibly not a good project for the mathematically naive like myself :Op
On Saturday, June 22, 2013 10:25:32 PM UTC-3, Andrew Gelman wrote:
I'm already talking to Mike Lawrence. I haven't tried to implement in Stan yet and I've been swamped with other stuff lately but will happily work with him (or others) to get it running because I'm pretty enthusiastic about Stan.
Given that pretty efficient/stable C++ code for the diffusion model exists I think it should be relatively easy.
Cheers,
Joachim
--
Joachim Vandekerckhove
Assistant Professor
Department of Cognitive Sciences
University of California, Irvine
Francis Tuerlinckx <Francis.T...@ppw.kuleuven.be> wrote:
hi andrew,
tell them that they can contact Joachim Vandekerckhove (in cc). he has c-coded PDFs for the simple wiener diffusion and maybe he already tried to link them to stan.
gr,
francis
From: Andrew Gelman [mailto:gel...@stat.columbia.edu]
Sent: maandag 24 juni 2013 1:58
To: Francis Tuerlinckx
Subject: Re: [stan-users] Translating a JAGS module for Stan?
F
More…
A
On Jun 23, 2013, at 7:57 PM, Peter Meilstrup wrote:
I've also been puzzled by trying to implement this model in Stan. If it helps the discussion along, I have some R code to simulate and illustrate this kind of model:
That Tuerlinckx paper is pretty heady. Here's a simpler introduction to the topic: http://www.shadlenlab.columbia.edu/~mike/papers/mine/okinawa_chapter2006.pdf
For most of the questions the mathematical psychologists have about such models (e.g. are bounds time-varying, is a single decision variable enough, how to deal with N>2 choices), finding closed form solutions for the likelihood function is a fool's errand. In practice, what people do is discretize the response time and the decision variable(s) over a grid, for each distinct type of trial, and then numerically sum out the Fokker-Planck equation from there to get likelihoods.
That's also the best idea I have for implementing this model in Stan, but I'm not sure if the gradient calculations can cope with it.
(Other possibilities are making the noise an explicit vector parameter for each trial, which would lead to an explosion of parameters.)
Peter Meilstrup
Physiology and Biophysics
University of Washington
On Sunday, June 23, 2013 6:18:23 AM UTC-7, Mike Lawrence wrote:
Hm, after some further reading (http://ppw.kuleuven.be/okp/_pdf/Tuerlinckx2004TECOT.pdf), it seems that the PDF is rather treacherous (see Eq 3), with parts that need numerical estimation on the fly. So possibly not a good project for the mathematically naive like myself :Op
On Saturday, June 22, 2013 10:25:32 PM UTC-3, Andrew Gelman wrote:
Mike,
Is there a pdf describing the model that is being fit in Jags? I clicked through and found code but no description of the probability model that is being fit. If there is an algorithm for computing the probability model, it should be possible to fit it in Stan, I'd think.
A
On Jun 22, 2013, at 8:07 PM, Mike Lawrence wrote:
Hi folks,
For decades it has been known that human response data from experiments involving simple perceptual discriminations are very well fit by a "diffusion model" consisting of a Wiener process unfolding through time between two bounds (reaching a bound causes the process to terminate, determining a response and the response time). I'd like to use Stan to perform inference on a hierarchical version of such a model (aggregating data from multiple human subjects, each measured hundreds of times). Apparently there already exists code in the form of a JAGS module (http://sourceforge.net/projects/jags-wiener/) that implements the sort of model I'd like to implement. Any advice on how I should go about translating this for use with Stan? Or are there tools already in Stan that could be used to implement this sort of model?
Mike
--
Mike Lawrence
Graduate Student
Department of Psychology & Neuroscience
Dalhousie University
~ Certainty is (possibly) folly ~
--
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/groups/opt_out.
--
No, it works just like the JAGS and WinBUGS ones, with negative values for error RTs (or lower bound hits). Very concise documentation is inside the wiener.hpp file.
What you wrote would probably also work, if you replace the -b with 1-b.
Joachim
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/29IcLbQ__uQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
Oh, sorry, I should have considered looking at the docs for the jags version again to refresh my memory. Beautiful :)
- Bob
--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/29IcLbQ__uQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
--
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.
(2) Addadd("wiener_log",DOUBLE_T,DOUBLE_T,DOUBLE_T,DOUBLE_T,DOUBLE_T,DOUBLE_T);to ~/stan/cmdstan/stan/src/stan/gm/function_signatures.h
for (size_t i = 0; i < vector_types.size(); ++i)
for (size_t j = 0; j < vector_types.size(); ++j)
for (size_t k = 0; k < vector_types.size(); ++k) {
add("normal_ccdf_log",
DOUBLE_T, // result
vector_types[i], vector_types[j], vector_types[k]); // args
add("normal_cdf",
DOUBLE_T, // result
vector_types[i], vector_types[j], vector_types[k]); // args
add("normal_cdf_log",
DOUBLE_T, // result
vector_types[i], vector_types[j], vector_types[k]); // args
add("normal_log",
DOUBLE_T, // result
vector_types[i], vector_types[j], vector_types[k]); // args
}
add_binary("normal_rng");
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.
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/29IcLbQ__uQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
> stan-users+unsubscribe@__googlegroups.com <mailto:stan-users%2Bunsubscrib...@googlegroups.com>.
> For more options, visit https://groups.google.com/__groups/opt_out <https://groups.google.com/groups/opt_out>.
>
>
>
> --
> 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/groups/opt_out.
--
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.