Skip to content

entry for wiener diffusion model#934

Open
Franzi2114 wants to merge 10 commits into
stan-dev:masterfrom
Franzi2114:feature/docs_for_wiener_lpdf_and_lcdf_unnorm
Open

entry for wiener diffusion model#934
Franzi2114 wants to merge 10 commits into
stan-dev:masterfrom
Franzi2114:feature/docs_for_wiener_lpdf_and_lcdf_unnorm

Conversation

@Franzi2114
Copy link
Copy Markdown
Contributor

Summary

This PR adds a user's guide entry for the wiener diffusion model. It is linked to the PRs for the seven parameter diffusion model PDF and CDF functions
stan-dev/math#2822
stan-dev/math#3042

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

Franziska Henrich

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@bob-carpenter
Copy link
Copy Markdown
Member

Thanks, so much, @Franzi2114. If nobody else can get to this, I can review it some time over the next week.

@Franzi2114
Copy link
Copy Markdown
Contributor Author

Perfec,t thanks @bob-carpenter! I was also in contact with @WardBrian before I did the PR.

There are still three open points that I didn't manage to incorporate:

  • The citations did not work locally although I added the entries in the bib file
  • I would prefer to include the .pdf version instead of the .jpeg version of the image as it has much higher quality
  • and there could be inserted a link to another subchapter of the User’s guide.

Please let me know when there occur more points that I should change.

@WardBrian WardBrian requested a review from bob-carpenter March 12, 2026 11:12
@WardBrian
Copy link
Copy Markdown
Member

Hi @Franzi2114 --

I've just pushed a commit that addresses each of your comments, since they're mostly quarto-wrangling:

  • The citations issue seems to have just been a small typo.
  • Quarto supports multi-format figures, so as it is currently written the website will use the JPG and the pdf manual will use the PDF. If you have a higher-quality raster image (png, nicer jpg, etc) we can use that on the web version instead
  • I added the link and made sure that this new chapter shows up on the sidebar.

@WardBrian
Copy link
Copy Markdown
Member

Pinging @bob-carpenter again -- I think the notifications for this got lost while you were away

@bob-carpenter
Copy link
Copy Markdown
Member

Thanks for pinging. I will review this week.

Copy link
Copy Markdown
Member

@bob-carpenter bob-carpenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Franzi:

I'm really sorry this is so many comments. Most of it's to try to get consistency with the rest of our documentation's formatting.

The most important comment is about the upper bounds for parameters that are missing from the examples.

If you'd rather not make the fixes yourself, I think I can go through and make almost all of them other than places where I had genuine questions.

Comment thread src/bibtex/all.bib Outdated
Comment thread src/bibtex/all.bib Outdated
Comment thread src/bibtex/all.bib Outdated
Comment thread src/bibtex/all.bib Outdated
Comment thread src/bibtex/all.bib Outdated
Censoring sometimes includes the response (i.e., it is known that the reaction time in a trial fell outside the response window, but which response was given is unknown). One method that has been used to model such data has involved inferring the numbers of missing responses of either kind from the observed relative frequencies of the two responses. This approach has the problem that quite specifc assumptions on the missing data have to be made (namely, that the proportions of the two kinds of responses are the same for responses within and outside the response window).

Here is a more principled approach that uses the cumulative distribution functions and their complements to provide the likelihood of censored data. As before, let $L$ be the left reaction time bound, and $U$ the right reaction time bound, and consider decision times without inter-trial variabilities for the sake of simplicity. It follows that the likelihood $p_l$ of observing a left-censored data point
is given by
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite the right usage of "likelihood". See:

https://statmodeling.stat.columbia.edu/2026/03/20/a-data-model-is-not-just-a-likelihood/

If we have a data-generating distribution $p(y \mid \theta)$, then if we fix $\theta$, we get a density for $y$. If we fix $y = y^\text{obs}$, we get the likelihood function $\mathcal{L}(\theta) = p(y^\text{obs} \mid \theta)$.

Specifically, this means we can't say "likelihood of data" as the likelihood function, in order to exist, has already fixed the data.

This is confused in the literature all over the place, but BDA makes it clear, as does Aki's post.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which formulation would you prefer here?

Comment thread src/stan-users-guide/wiener_diffusion_model.qmd
Comment thread src/stan-users-guide/wiener_diffusion_model.qmd Outdated
Comment thread src/stan-users-guide/wiener_diffusion_model.qmd Outdated
Comment thread src/stan-users-guide/wiener_diffusion_model.qmd
@Franzi2114
Copy link
Copy Markdown
Contributor Author

Dear @bob-carpenter, I worked through all your comments and made several changes!

Could you have another look at it? I also had some questions regarding your posts. I wrote them below your comments.

I am afraid that I messed something up with the all.bib file. Can you fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants