# \#cognitive-science

**URL:** https://discourse.mc-stan.org/tag/cognitive-science/163.md?match_all_tags=true&page=1&tags%5B%5D=cognitive-science

[Latest](https://discourse.mc-stan.org/latest.md) · [Categories](https://discourse.mc-stan.org/categories.md) · [Tags](https://discourse.mc-stan.org/tags.md)

**Page:** 2

---

## [Conditioning a correlation on another variable](https://discourse.mc-stan.org/t/conditioning-a-correlation-on-another-variable/25070)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 4\
**Last updated:** [November 18, 2021, 10:21pm UTC](https://discourse.mc-stan.org/t/conditioning-a-correlation-on-another-variable/25070 "2021-11-18T22:21:54Z")

</div>

tl;dr: I want to model a correlation between two latent parameters (estimated from observable data) and condition that correlation on another observable variable. I got stuck modeling the correlation, and extending the m…

---

## [Modifying brms code to condition correlationbtw varying effects on an observed variable](https://discourse.mc-stan.org/t/modifying-brms-code-to-condition-correlationbtw-varying-effects-on-an-observed-variable/25106)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 1\
**Last updated:** [November 10, 2021, 1:08pm UTC](https://discourse.mc-stan.org/t/modifying-brms-code-to-condition-correlationbtw-varying-effects-on-an-observed-variable/25106 "2021-11-10T13:08:09Z")

</div>

tl;dr: I want to modify brms code, so that a correlation between two random effects and condition that correlation on another observable variable. Imagine a situation in which two latent variables are correlated, but th…

---

## [Understanding LOOIC](https://discourse.mc-stan.org/t/understanding-looic/13409)

<div class="topic-metadata">

**Author:** [@Longshot408](https://discourse.mc-stan.org/u/Longshot408)\
**Replies:** 15\
**Last updated:** [November 8, 2021, 11:58pm UTC](https://discourse.mc-stan.org/t/understanding-looic/13409 "2021-11-08T23:58:26Z")

</div>

Hello all, I’m making progress on my first Bayesian models, but I’m having a hard time understanding how to assess model performance and compare various competing models. As of right now I am doing that with bayestestR:…

---

## [Divergences in multilevel signal detection theory model](https://discourse.mc-stan.org/t/divergences-in-multilevel-signal-detection-theory-model/24614)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 3\
**Last updated:** [October 8, 2021, 1:49pm UTC](https://discourse.mc-stan.org/t/divergences-in-multilevel-signal-detection-theory-model/24614 "2021-10-08T13:49:12Z")

</div>

I have been working on a simple multilevel signal detection theory model as presented in Lee & Wagenmakers Bayesian Cognitive Modeling). The model can fit simulated data nicely enough, but I’m getting a small percentage…

---

## [Get the difference between two conditions in the raw scale from a model with a lognormal likelihood](https://discourse.mc-stan.org/t/get-the-difference-between-two-conditions-in-the-raw-scale-from-a-model-with-a-lognormal-likelihood/24440)

<div class="topic-metadata">

**Author:** [@bnicenboim](https://discourse.mc-stan.org/u/bnicenboim)\
**Replies:** 12\
**Last updated:** [October 4, 2021, 5:18am UTC](https://discourse.mc-stan.org/t/get-the-difference-between-two-conditions-in-the-raw-scale-from-a-model-with-a-lognormal-likelihood/24440 "2021-10-04T05:18:34Z")

</div>

Hi, I’m trying to figure out the way to get the posterior of the difference between two trials in milliseconds from a model that was fit using a lognormal likelihood. I can extract the draws and do it “manually” but I w…

---

## [Mismatch in number of dimensions declared and found](https://discourse.mc-stan.org/t/mismatch-in-number-of-dimensions-declared-and-found/24599)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 5\
**Last updated:** [October 1, 2021, 10:49am UTC](https://discourse.mc-stan.org/t/mismatch-in-number-of-dimensions-declared-and-found/24599 "2021-10-01T10:49:11Z")

</div>

I’m trying to pass a matrix as data to a stan model (via cmdstanr), but somehow the data gets read as a vector, generating the following error message: mismatch in number dimensions declared and found in context; proc…

---

## [Classification/diagnosis via multivariate normal mixtures for n = 1 cases](https://discourse.mc-stan.org/t/classification-diagnosis-via-multivariate-normal-mixtures-for-n-1-cases/8558)

<div class="topic-metadata">

**Author:** [@wgoette](https://discourse.mc-stan.org/u/wgoette)\
**Replies:** 6\
**Last updated:** [September 24, 2021, 8:50am UTC](https://discourse.mc-stan.org/t/classification-diagnosis-via-multivariate-normal-mixtures-for-n-1-cases/8558 "2021-09-24T08:50:08Z")

</div>

I’m working on a model for examining the probability that an observed score on a cognitive assessment comes from a particular normative or reference sample (i.e., whether a score is likely an observation from the populat…

---

## [Simple change detection model (2 means) being eerily slow](https://discourse.mc-stan.org/t/simple-change-detection-model-2-means-being-eerily-slow/24329)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 3\
**Last updated:** [September 13, 2021, 7:41am UTC](https://discourse.mc-stan.org/t/simple-change-detection-model-2-means-being-eerily-slow/24329 "2021-09-13T07:41:09Z")

</div>

I am reimplementing the change detection model from Lee&Wagenmakers Bayesian Cognitive Modeling (based on Smira’s earlier recoding). The data (CognitiveModelingRecoded/13\_data.txt at main · fusaroli/CognitiveModelingRec…

---

## [Setting a prior on a correlation coefficient (which is a transformed parameter)](https://discourse.mc-stan.org/t/setting-a-prior-on-a-correlation-coefficient-which-is-a-transformed-parameter/24281)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 4\
**Last updated:** [September 7, 2021, 10:42am UTC](https://discourse.mc-stan.org/t/setting-a-prior-on-a-correlation-coefficient-which-is-a-transformed-parameter/24281 "2021-09-07T10:42:24Z")

</div>

I am recoding Bayesian Cognitive Modeling in Stan + cmdstanr. In the Pearson correlation model, r is a transformed parameter (see model below), r code to run it here (https://github.com/fusaroli/CognitiveModelingRecoded…

---

## ["Bayesian Cognitive Modeling" in cmdstanr](https://discourse.mc-stan.org/t/bayesian-cognitive-modeling-in-cmdstanr/24195)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 5\
**Last updated:** [September 6, 2021, 4:20pm UTC](https://discourse.mc-stan.org/t/bayesian-cognitive-modeling-in-cmdstanr/24195 "2021-09-06T16:20:51Z")

</div>

I’m teaching myself how to better Stan by recoding “Bayesian Cognitive Modeling” by Lee and Wagenmakers in Stan + cmdstanr. I am aware of the stan/rstan recoding by Martin Smira (example-models/Bayesian\_Cognitive\_Modelin…

---

## [Divergences when adding prior sampling](https://discourse.mc-stan.org/t/divergences-when-adding-prior-sampling/24267)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 4\
**Last updated:** [September 6, 2021, 4:13pm UTC](https://discourse.mc-stan.org/t/divergences-when-adding-prior-sampling/24267 "2021-09-06T16:13:32Z")

</div>

I am working my way through Bayesian Cognitive Modeling, recoding the models in Stan + cmdstanr and adding a bunch of quality checks (e.g. prior-posterior updates, predictive checks, etc.). I am working through the “Sev…

---

## [Issue with behrens volatility bayesian reinforcement learning model](https://discourse.mc-stan.org/t/issue-with-behrens-volatility-bayesian-reinforcement-learning-model/23603)

<div class="topic-metadata">

**Author:** [@mingqian.guo](https://discourse.mc-stan.org/u/mingqian.guo)\
**Replies:** 3\
**Last updated:** [August 16, 2021, 4:06pm UTC](https://discourse.mc-stan.org/t/issue-with-behrens-volatility-bayesian-reinforcement-learning-model/23603 "2021-08-16T16:06:31Z")

</div>

Dear Stan expert, I am trying to use Behrens volatility model in Stan, and it is always failed in the Initialization steps. Can someone check my code? Thank you very much. The math detail of volatility model can be foun…

---

## [Call for cognitive-science related models for inclusion in the benchmarking project](https://discourse.mc-stan.org/t/call-for-cognitive-science-related-models-for-inclusion-in-the-benchmarking-project/23172)

<div class="topic-metadata">

**Author:** [@mike-lawrence](https://discourse.mc-stan.org/u/mike-lawrence)\
**Replies:** 6\
**Last updated:** [July 21, 2021, 9:02pm UTC](https://discourse.mc-stan.org/t/call-for-cognitive-science-related-models-for-inclusion-in-the-benchmarking-project/23172 "2021-07-21T21:02:58Z")

</div>

Hey folks, I’m helping supervise @kn2465’s work on the Benchmarking GSOC project and we’re looking for structurally-interesting models to include, ideally with some associated description in existing literature. I have s…

---

## [Handling discrete parameter in a very specific response time model](https://discourse.mc-stan.org/t/handling-discrete-parameter-in-a-very-specific-response-time-model/23058)

<div class="topic-metadata">

**Author:** [@Cengiz\_Zopluoglu](https://discourse.mc-stan.org/u/Cengiz_Zopluoglu)\
**Replies:** 13\
**Last updated:** [June 24, 2021, 3:09pm UTC](https://discourse.mc-stan.org/t/handling-discrete-parameter-in-a-very-specific-response-time-model/23058 "2021-06-24T15:09:33Z")

</div>

Hi, I will first try to describe the model we successfully fit and get reasonably good results. Then, I will ask about how we want to improve it by relaxing an assumption. I believe this involves sampling discrete param…

---

## [Incorporating contextual knowledge about semi-supervised experiment](https://discourse.mc-stan.org/t/incorporating-contextual-knowledge-about-semi-supervised-experiment/22793)

<div class="topic-metadata">

**Author:** [@pmeiners](https://discourse.mc-stan.org/u/pmeiners)\
**Replies:** 4\
**Last updated:** [June 5, 2021, 7:01pm UTC](https://discourse.mc-stan.org/t/incorporating-contextual-knowledge-about-semi-supervised-experiment/22793 "2021-06-05T19:01:02Z")

</div>

I am currently designing an experiment frequently referred to as a “transmission-chain” experiment. In this design, an initial group of people reads a text. They then are asked to transmit the information in the text to…

---

## [Measurement error models using me()](https://discourse.mc-stan.org/t/measurement-error-models-using-me/22763)

<div class="topic-metadata">

**Author:** [@bnicenboim](https://discourse.mc-stan.org/u/bnicenboim)\
**Replies:** 7\
**Last updated:** [May 29, 2021, 8:37pm UTC](https://discourse.mc-stan.org/t/measurement-error-models-using-me/22763 "2021-05-29T20:37:09Z")

</div>

Hi, I’m dealing with a very simple model that has measurement error in the DV and IV. I’m almost sure that this was working before. But now it’s throwing divergent errors and the estimates don’t make sense. This is the…

---

## [Understanding measurement error models w fake data (when the error is quadratically related to the measure)](https://discourse.mc-stan.org/t/understanding-measurement-error-models-w-fake-data-when-the-error-is-quadratically-related-to-the-measure/22697)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 9\
**Last updated:** [May 28, 2021, 9:23pm UTC](https://discourse.mc-stan.org/t/understanding-measurement-error-models-w-fake-data-when-the-error-is-quadratically-related-to-the-measure/22697 "2021-05-28T21:23:39Z")

</div>

I’m trying to understand the impact of measurement error on inferred parameters (reproducible example below). In a study we are building a multilevel model of the performance of parents, and one of the performance of th…

---

## [Rank order modeling in stan, with some complications](https://discourse.mc-stan.org/t/rank-order-modeling-in-stan-with-some-complications/22611)

<div class="topic-metadata">

**Author:** [@richarddmorey](https://discourse.mc-stan.org/u/richarddmorey)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 2:55pm UTC](https://discourse.mc-stan.org/t/rank-order-modeling-in-stan-with-some-complications/22611 "2021-05-20T14:55:38Z")

</div>

I’m trying to fit a model to rank ordered data, with a few complications: I have latent classes including some people who reverse the order accidentally or who respond randomly, I want to model a few covariances betwee…

---

## [Zero and one inflated beta regression - posterior predictive checks by component (π1, π0, μ)](https://discourse.mc-stan.org/t/zero-and-one-inflated-beta-regression-posterior-predictive-checks-by-component-1-0/22363)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 2\
**Last updated:** [May 13, 2021, 3:19pm UTC](https://discourse.mc-stan.org/t/zero-and-one-inflated-beta-regression-posterior-predictive-checks-by-component-1-0/22363 "2021-05-13T15:19:54Z")

</div>

I’ve built a zero and one inflated beta regression of linguistic alignment data (on a 0-1 scale, from no word re-use to exact repetition). Zero inflation is π0, one inflation is π1, and the mean of the beta is μ. Conce…

---

## [Modeling number of trials until k (6) consecutive successes with right censorship](https://discourse.mc-stan.org/t/modeling-number-of-trials-until-k-6-consecutive-successes-with-right-censorship/22261)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 2\
**Last updated:** [May 10, 2021, 7:53am UTC](https://discourse.mc-stan.org/t/modeling-number-of-trials-until-k-6-consecutive-successes-with-right-censorship/22261 "2021-05-10T07:53:10Z")

</div>

I have a dataset in which each participant has to repeatedly solve a task (2 alternative forced choice, participants have to infer a rule to discriminate between them). In order to finish a given “stage”, they have to h…

---

## [Mixture model fails on cmdstanr when conditioning theta on participant, but not on rstan](https://discourse.mc-stan.org/t/mixture-model-fails-on-cmdstanr-when-conditioning-theta-on-participant-but-not-on-rstan/22018)

<div class="topic-metadata">

**Author:** [@fusaroli](https://discourse.mc-stan.org/u/fusaroli)\
**Replies:** 6\
**Last updated:** [May 7, 2021, 8:27pm UTC](https://discourse.mc-stan.org/t/mixture-model-fails-on-cmdstanr-when-conditioning-theta-on-participant-but-not-on-rstan/22018 "2021-05-07T20:27:24Z")

</div>

I am playing with the data in Reading wild minds: A computational assay of Theory of Mind sophistication across seven primate species , where different kinds of primates play a “matching pennies” game (guess in which han…

---

## [Create temporary stan object for indexing (needs to be integer) that is not a data object](https://discourse.mc-stan.org/t/create-temporary-stan-object-for-indexing-needs-to-be-integer-that-is-not-a-data-object/22033)

<div class="topic-metadata">

**Author:** [@johalgermissen](https://discourse.mc-stan.org/u/johalgermissen)\
**Replies:** 2\
**Last updated:** [April 25, 2021, 6:30pm UTC](https://discourse.mc-stan.org/t/create-temporary-stan-object-for-indexing-needs-to-be-integer-that-is-not-a-data-object/22033 "2021-04-25T18:30:38Z")

</div>

Dear stan community, I have a question that is rather a “nice thing to have” than an error/ necessity. If I see correctly, in stan, to extract values from vectors or matrices, I need to provide indices of the rows/colu…

---

## [Custom likelihood function based on Wiener first passage time density accounting for NoGo responses](https://discourse.mc-stan.org/t/custom-likelihood-function-based-on-wiener-first-passage-time-density-accounting-for-nogo-responses/21912)

<div class="topic-metadata">

**Author:** [@johalgermissen](https://discourse.mc-stan.org/u/johalgermissen)\
**Replies:** 6\
**Last updated:** [April 22, 2021, 7:34am UTC](https://discourse.mc-stan.org/t/custom-likelihood-function-based-on-wiener-first-passage-time-density-accounting-for-nogo-responses/21912 "2021-04-22T07:34:51Z")

</div>

Dear Stan community, I’m trying to fit a multi-level drift diffusion model (DDM) based on the Wiener first passage time distribution (here in the stan documentation; here in the stan math library). In my task, the corr…

---

## [Cognitive Science and Neuroscience StanConnect 2021 Call for abstracts](https://discourse.mc-stan.org/t/cognitive-science-and-neuroscience-stanconnect-2021-call-for-abstracts/21801)

<div class="topic-metadata">

**Author:** [@bnicenboim](https://discourse.mc-stan.org/u/bnicenboim)\
**Replies:** 11\
**Last updated:** [April 22, 2021, 7:05am UTC](https://discourse.mc-stan.org/t/cognitive-science-and-neuroscience-stanconnect-2021-call-for-abstracts/21801 "2021-04-22T07:05:55Z")

</div>

Dear all, As part of StanConnect 2021, we intend to propose a session on cognitive science and neuroscience on November 26, 2021, time to be confirmed (depending on the location of the majority of the speakers) 2021-11-…

---

## [Extending the diffusion/Wiener model analysis to close the boundary condition over time](https://discourse.mc-stan.org/t/extending-the-diffusion-wiener-model-analysis-to-close-the-boundary-condition-over-time/4364)

<div class="topic-metadata">

**Author:** [@Stannats](https://discourse.mc-stan.org/u/Stannats)\
**Replies:** 4\
**Last updated:** [April 16, 2021, 2:03pm UTC](https://discourse.mc-stan.org/t/extending-the-diffusion-wiener-model-analysis-to-close-the-boundary-condition-over-time/4364 "2021-04-16T14:03:25Z")

</div>

I’m working with Henrik Singman’s tutorial on how to use brms and rstan to fit a diffusion/wiener model. What I’d like to do is to manipulate the boundary separation (alpha) so that instead of it being a constant boundar…

---

## [Truncation in a parameter based on other parameters](https://discourse.mc-stan.org/t/truncation-in-a-parameter-based-on-other-parameters/21789)

<div class="topic-metadata">

**Author:** [@bnicenboim](https://discourse.mc-stan.org/u/bnicenboim)\
**Replies:** 3\
**Last updated:** [April 10, 2021, 7:51pm UTC](https://discourse.mc-stan.org/t/truncation-in-a-parameter-based-on-other-parameters/21789 "2021-04-10T19:51:03Z")

</div>

Hi, I can’t figure out what I’m doing wrong here. I’m pretty sure I did this already and worked fine. I have a regression based on a gamma likelihood without any link. So the first parameter has to be positive. The fi…

---

## [How to write a finite discrete mixture model in stan](https://discourse.mc-stan.org/t/how-to-write-a-finite-discrete-mixture-model-in-stan/21506)

<div class="topic-metadata">

**Author:** [@Canaan\_Breiss](https://discourse.mc-stan.org/u/Canaan_Breiss)\
**Replies:** 11\
**Last updated:** [March 29, 2021, 6:08pm UTC](https://discourse.mc-stan.org/t/how-to-write-a-finite-discrete-mixture-model-in-stan/21506 "2021-03-29T18:08:10Z")

</div>

Hi folks, I’m trying to translate a field-specific theory (usually implemented in excel, of all places…) into Stan to take advantage of the quantification of uncertainty that goes along with Bayes. I’m having some troub…

---

## [Exploded logit distribution for modeling ranking data](https://discourse.mc-stan.org/t/exploded-logit-distribution-for-modeling-ranking-data/21412)

<div class="topic-metadata">

**Author:** [@bnicenboim](https://discourse.mc-stan.org/u/bnicenboim)\
**Replies:** 0\
**Last updated:** [March 21, 2021, 8:08pm UTC](https://discourse.mc-stan.org/t/exploded-logit-distribution-for-modeling-ranking-data/21412 "2021-03-21T20:08:31Z")

</div>

I wrote a blogpost on the exploded logit distribution for modeling ranking data. It’s a super simple distribution, and it seems quite useful. It seems very common in economics, but I wasn’t aware of it. (Someone asked ab…

---

## [Weakly informative priors for Shifted LogNormal](https://discourse.mc-stan.org/t/weakly-informative-priors-for-shifted-lognormal/16206)

<div class="topic-metadata">

**Author:** [@grusha.prasad](https://discourse.mc-stan.org/u/grusha.prasad)\
**Replies:** 3\
**Last updated:** [March 1, 2021, 5:20am UTC](https://discourse.mc-stan.org/t/weakly-informative-priors-for-shifted-lognormal/16206 "2021-03-01T05:20:42Z")

</div>

Thank you both for this useful thread! I am also trying to specify weakly informative priors for a lognormal distribution (modeling reading times). Unlike Anthony, I am not interested in testing the effect of condition …

---

## [Unable to recover mixture between Wiener-diffusion and uniform distribution](https://discourse.mc-stan.org/t/unable-to-recover-mixture-between-wiener-diffusion-and-uniform-distribution/5612)

<div class="topic-metadata">

**Author:** [@Henrik\_Singmann](https://discourse.mc-stan.org/u/Henrik_Singmann)\
**Replies:** 14\
**Last updated:** [February 17, 2021, 4:22pm UTC](https://discourse.mc-stan.org/t/unable-to-recover-mixture-between-wiener-diffusion-and-uniform-distribution/5612 "2021-02-17T16:22:39Z")

</div>

A common problem when modeling response time data with the wiener-diffusion model are contaminant response times. Especially fast outliers (sometimes called anticipatory responses) can essentially completely determine th…

[Previous page](https://discourse.mc-stan.org/tag/cognitive-science/163.md?match_all_tags=true&tags%5B%5D=cognitive-science)

[Next page](https://discourse.mc-stan.org/tag/cognitive-science/163.md?match_all_tags=true&page=2&tags%5B%5D=cognitive-science)
