# \#techniques

**URL:** https://discourse.mc-stan.org/tag/techniques/14.md

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

---

## [A "squashed" normal distribution](https://discourse.mc-stan.org/t/a-squashed-normal-distribution/41655)

<div class="topic-metadata">

**Author:** [@maxgotts](https://discourse.mc-stan.org/u/maxgotts)\
**Replies:** 10\
**Last updated:** [November 2, 2026, 6:44am UTC](https://discourse.mc-stan.org/t/a-squashed-normal-distribution/41655 "2026-11-02T06:44:11Z")

</div>

I often find myself trying to fit a normal distribution that is skewed. Not a “skewed normal distribution,” but a normal distribution with one side cut to nearly zero. I’ve even gone as far as trying to make a custom log…

---

## [How do deal with non-plausible steady state in ODE](https://discourse.mc-stan.org/t/how-do-deal-with-non-plausible-steady-state-in-ode/41691)

<div class="topic-metadata">

**Author:** [@emil\_frej](https://discourse.mc-stan.org/u/emil_frej)\
**Replies:** 5\
**Last updated:** [October 27, 2026, 8:11pm UTC](https://discourse.mc-stan.org/t/how-do-deal-with-non-plausible-steady-state-in-ode/41691 "2026-10-27T20:11:33Z")

</div>

I’m working on a model of prostate cancer for which the data often pushes posteriors toward results that we are pretty confident are wrong. I’m hoping someone has input on what a principled way to deal with this situatio…

---

## [Interpolating in a look-up table](https://discourse.mc-stan.org/t/interpolating-in-a-look-up-table/41533)

<div class="topic-metadata">

**Author:** [@bmelinden](https://discourse.mc-stan.org/u/bmelinden)\
**Replies:** 3\
**Last updated:** [August 30, 2026, 5:36pm UTC](https://discourse.mc-stan.org/t/interpolating-in-a-look-up-table/41533 "2026-08-30T17:36:32Z")

</div>

In a recent project I was missing a look-up functionality in stan, meaning I wanted to define some problem-specific function (of one variable) and use it in my model specification. An example would be if my model include…

---

## [JAGS vs Stan performance - how to compare 'workflow efficiency'?](https://discourse.mc-stan.org/t/jags-vs-stan-performance-how-to-compare-workflow-efficiency/41473)

<div class="topic-metadata">

**Author:** [@buf](https://discourse.mc-stan.org/u/buf)\
**Replies:** 7\
**Last updated:** [August 6, 2026, 12:45pm UTC](https://discourse.mc-stan.org/t/jags-vs-stan-performance-how-to-compare-workflow-efficiency/41473 "2026-08-06T12:45:33Z")

</div>

Hi everyone, I have a bunch of models in JAGS and have translated them to Stan. The Stan versions, however, are not identical to the JAGS versions (I had to introduce some smoothing for Stan to work). The posteriors of …

---

## [Using Laplace approximation for logistic normal multinomial model](https://discourse.mc-stan.org/t/using-laplace-approximation-for-logistic-normal-multinomial-model/41305)

<div class="topic-metadata">

**Author:** [@Yingnan\_Gao](https://discourse.mc-stan.org/u/Yingnan_Gao)\
**Replies:** 15\
**Last updated:** [July 14, 2026, 6:11pm UTC](https://discourse.mc-stan.org/t/using-laplace-approximation-for-logistic-normal-multinomial-model/41305 "2026-07-14T18:11:36Z")

</div>

Hello Stan community, I posted a thread regarding some difficult geometries I encountered for fitting logistic normal multinomial model with explicit latent residuals (so that the likelihood can be evaluated for observe…

---

## [Multilevel multiresponse phylogenetic mixed models with brms](https://discourse.mc-stan.org/t/multilevel-multiresponse-phylogenetic-mixed-models-with-brms/41411)

<div class="topic-metadata">

**Author:** [@Anoban](https://discourse.mc-stan.org/u/Anoban)\
**Replies:** 4\
**Last updated:** [July 10, 2026, 2:48am UTC](https://discourse.mc-stan.org/t/multilevel-multiresponse-phylogenetic-mixed-models-with-brms/41411 "2026-07-10T02:48:26Z")

</div>

Hi folks! I’m a 2nd year PhD student studying root ecological strategies and mycorrhizal outsourcing. I’m interested in understanding how the evolution of three response variables (three root traits) is influenced by a …

---

## [Tidybayes, posterior prediction, and cmdstanr](https://discourse.mc-stan.org/t/tidybayes-posterior-prediction-and-cmdstanr/35062)

<div class="topic-metadata">

**Author:** [@cwolfe](https://discourse.mc-stan.org/u/cwolfe)\
**Replies:** 5\
**Last updated:** [June 24, 2026, 10:36am UTC](https://discourse.mc-stan.org/t/tidybayes-posterior-prediction-and-cmdstanr/35062 "2026-06-24T10:36:09Z")

</div>

Apologies if this is inappropriate here, but I figured I would give it a shot. I am trying to plot posterior prediction curves (or even the expectation of the prediction) much like the code here from @mjskay vignette on…

---

## [How to handle high Pareto k when observations are meaningful?](https://discourse.mc-stan.org/t/how-to-handle-high-pareto-k-when-observations-are-meaningful/41368)

<div class="topic-metadata">

**Author:** [@cMiIIer](https://discourse.mc-stan.org/u/cMiIIer)\
**Replies:** 8\
**Last updated:** [June 18, 2026, 8:49pm UTC](https://discourse.mc-stan.org/t/how-to-handle-high-pareto-k-when-observations-are-meaningful/41368 "2026-06-18T20:49:34Z")

</div>

Hello, I am attempting to fit discrete time event models to some frog tadpole metamorphosis data. I have been able to successfully fit the model, but LOO for model comparisons demonstrate high pareto K values for rough…

---

## ['Disjunction' of type traits (for combined varmat/matvar custom C++ template)?](https://discourse.mc-stan.org/t/disjunction-of-type-traits-for-combined-varmat-matvar-custom-c-template/41359)

<div class="topic-metadata">

**Author:** [@bifouba](https://discourse.mc-stan.org/u/bifouba)\
**Replies:** 11\
**Last updated:** [June 18, 2026, 11:47am UTC](https://discourse.mc-stan.org/t/disjunction-of-type-traits-for-combined-varmat-matvar-custom-c-template/41359 "2026-06-18T11:47:14Z")

</div>

This builds on a previous conversation about custom C++ implementations of multivariate functions: Vector-valued functions with manual gradients in external C++ I have successfully got the attached small example working…

---

## [A sufficient implementation of the multivariate normal lpdf](https://discourse.mc-stan.org/t/a-sufficient-implementation-of-the-multivariate-normal-lpdf/41346)

<div class="topic-metadata">

**Author:** [@markjrieke](https://discourse.mc-stan.org/u/markjrieke)\
**Replies:** 5\
**Last updated:** [June 9, 2026, 5:47pm UTC](https://discourse.mc-stan.org/t/a-sufficient-implementation-of-the-multivariate-normal-lpdf/41346 "2026-06-09T17:47:12Z")

</div>

I worked out a sufficient implementation of the multivariate normal. Compute the element-wise sums of \\sum \\mathbf{y} \\mathbf{y}^{\\text{T}} and \\sum \\mathbf{y}^\\text{T} (xxts and xts in the function below), then pass to …

---

## [Resolving difficult geometry in logistic normal multinomial model](https://discourse.mc-stan.org/t/resolving-difficult-geometry-in-logistic-normal-multinomial-model/41296)

<div class="topic-metadata">

**Author:** [@Yingnan\_Gao](https://discourse.mc-stan.org/u/Yingnan_Gao)\
**Replies:** 2\
**Last updated:** [June 7, 2026, 2:02am UTC](https://discourse.mc-stan.org/t/resolving-difficult-geometry-in-logistic-normal-multinomial-model/41296 "2026-06-07T02:02:45Z")

</div>

Hello all, I have been benchmarking a logistic normal multinomial model with an arbitrary correlation matrix as a parameter. I simulated some data following the logistic normal multinomial model and I fitted the simulate…

---

## [Projpred interpretation](https://discourse.mc-stan.org/t/projpred-interpretation/41223)

<div class="topic-metadata">

**Author:** [@ViktorVdV](https://discourse.mc-stan.org/u/ViktorVdV)\
**Replies:** 2\
**Last updated:** [May 16, 2026, 11:42am UTC](https://discourse.mc-stan.org/t/projpred-interpretation/41223 "2026-05-16T11:42:50Z")

</div>

Hi all, I am using projpred to reduce my predictor set. One of my colleagues raised a concern that I would like to get some expert opinion on. The concern is about correlated predictors and the risk of over-interpretin…

---

## [Using projpred with a hierarchical Stan model with posterior-draw measurement error](https://discourse.mc-stan.org/t/using-projpred-with-a-hierarchical-stan-model-with-posterior-draw-measurement-error/41082)

<div class="topic-metadata">

**Author:** [@ViktorVdV](https://discourse.mc-stan.org/u/ViktorVdV)\
**Replies:** 3\
**Last updated:** [May 7, 2026, 9:30am UTC](https://discourse.mc-stan.org/t/using-projpred-with-a-hierarchical-stan-model-with-posterior-draw-measurement-error/41082 "2026-05-07T09:30:20Z")

</div>

Hi all, I’m working with a Stan model where I explicitly propagate uncertainty from a previous model by using posterior draws as inputs. I’m now trying to perform predictor selection among 9 covariates that exhibit some…

---

## [Log Likelihood for Structural Equation Modeles](https://discourse.mc-stan.org/t/log-likelihood-for-structural-equation-modeles/41050)

<div class="topic-metadata">

**Author:** [@cMiIIer](https://discourse.mc-stan.org/u/cMiIIer)\
**Replies:** 2\
**Last updated:** [April 21, 2026, 8:24pm UTC](https://discourse.mc-stan.org/t/log-likelihood-for-structural-equation-modeles/41050 "2026-04-21T20:24:26Z")

</div>

Hello! I am working on a Dynamic Structural Equation model and I am having trouble generating log likelihood values for model comparisons. I am new to SEM in Stan and I am lost about how to proceed, I tried doing multid…

---

## [Looking for Guidance on Using Cumulative models to understand disease progression in wildlife images from camera traps](https://discourse.mc-stan.org/t/looking-for-guidance-on-using-cumulative-models-to-understand-disease-progression-in-wildlife-images-from-camera-traps/41042)

<div class="topic-metadata">

**Author:** [@Nina\_Kappel](https://discourse.mc-stan.org/u/Nina_Kappel)\
**Replies:** 1\
**Last updated:** [April 10, 2026, 8:32pm UTC](https://discourse.mc-stan.org/t/looking-for-guidance-on-using-cumulative-models-to-understand-disease-progression-in-wildlife-images-from-camera-traps/41042 "2026-04-10T20:32:58Z")

</div>

Please share your Stan program and accompanying data if possible. Hello all, I am a master’s student working on a camera trapping project trying to see if we can use cameras to model disease progression in moose. If yo…

---

## [Confluent hypergeometric functions to estimate population size and detection probability from spatially replicated counts](https://discourse.mc-stan.org/t/confluent-hypergeometric-functions-to-estimate-population-size-and-detection-probability-from-spatially-replicated-counts/28758)

<div class="topic-metadata">

**Author:** [@nikunj410](https://discourse.mc-stan.org/u/nikunj410)\
**Replies:** 12\
**Last updated:** [March 28, 2026, 2:18am UTC](https://discourse.mc-stan.org/t/confluent-hypergeometric-functions-to-estimate-population-size-and-detection-probability-from-spatially-replicated-counts/28758 "2026-03-28T02:18:03Z")

</div>

I am modeling spatial population dynamics which consist of two layers. The inner layer is the population abundance of the species which is modeled using an a spatial population dynamics model. The outer layer is the obs…

---

## [Scenarios joint with estimation](https://discourse.mc-stan.org/t/scenarios-joint-with-estimation/41005)

<div class="topic-metadata">

**Author:** [@Gianni\_Lombardo](https://discourse.mc-stan.org/u/Gianni_Lombardo)\
**Replies:** 0\
**Last updated:** [March 25, 2026, 5:48pm UTC](https://discourse.mc-stan.org/t/scenarios-joint-with-estimation/41005 "2026-03-25T17:48:23Z")

</div>

Hi, I have a question that might sound philosophical. It concerns the treatment of scenario data in the estimation of a BVAR (Bayesian vector autoregressive model) and scenario analysis. In econometrics, the standard a…

---

## [Hierarchical model, binning, no closed-form integral](https://discourse.mc-stan.org/t/hierarchical-model-binning-no-closed-form-integral/40959)

<div class="topic-metadata">

**Author:** [@tpapp](https://discourse.mc-stan.org/u/tpapp)\
**Replies:** 11\
**Last updated:** [March 11, 2026, 1:55pm UTC](https://discourse.mc-stan.org/t/hierarchical-model-binning-no-closed-form-integral/40959 "2026-03-11T13:55:45Z")

</div>

I have a difficult time conceptualizing a multilevel model where some observations are binned. The following is a simplification of my actual model for the purposes of asking this question. I have parameters \\theta, \\va…

---

## [Simulating time to event data with a lagged treatment effect](https://discourse.mc-stan.org/t/simulating-time-to-event-data-with-a-lagged-treatment-effect/40940)

<div class="topic-metadata">

**Author:** [@dkbishop](https://discourse.mc-stan.org/u/dkbishop)\
**Replies:** 2\
**Last updated:** [March 10, 2026, 9:35am UTC](https://discourse.mc-stan.org/t/simulating-time-to-event-data-with-a-lagged-treatment-effect/40940 "2026-03-10T09:35:07Z")

</div>

Hi all, My post is more of a preamble to before I need to use Stan. I’m currently trying to simulate some time to event data from a Weibull distribution. The trick is that I want to simulate the data when the treatment …

---

## [Two-part mixture model on left-censored biomarker data](https://discourse.mc-stan.org/t/two-part-mixture-model-on-left-censored-biomarker-data/40899)

<div class="topic-metadata">

**Author:** [@Biomarker\_Researcher](https://discourse.mc-stan.org/u/Biomarker_Researcher)\
**Replies:** 12\
**Last updated:** [February 19, 2026, 3:39pm UTC](https://discourse.mc-stan.org/t/two-part-mixture-model-on-left-censored-biomarker-data/40899 "2026-02-19T15:39:07Z")

</div>

I am trying to model blood biomarker data collected longitudinally in a sample of patients vs. controls. There are 4 sampling timepoints, with patient data collected either at timepoint 1 or 2 (I have considered combinin…

---

## [How to sample a (singular) covariance matrix under compositional constraint](https://discourse.mc-stan.org/t/how-to-sample-a-singular-covariance-matrix-under-compositional-constraint/40886)

<div class="topic-metadata">

**Author:** [@Yingnan\_Gao](https://discourse.mc-stan.org/u/Yingnan_Gao)\
**Replies:** 14\
**Last updated:** [February 19, 2026, 5:32am UTC](https://discourse.mc-stan.org/t/how-to-sample-a-singular-covariance-matrix-under-compositional-constraint/40886 "2026-02-19T05:32:43Z")

</div>

Hello Stan Community, I model the composition of n groups as a sum-to-zero vector X (after centered-log-ratio transformation) such that it follows the multivariate normal distribution with mean 0 and a singular variance…

---

## [Resources for DSEM](https://discourse.mc-stan.org/t/resources-for-dsem/40927)

<div class="topic-metadata">

**Author:** [@cMiIIer](https://discourse.mc-stan.org/u/cMiIIer)\
**Replies:** 3\
**Last updated:** [February 16, 2026, 10:07pm UTC](https://discourse.mc-stan.org/t/resources-for-dsem/40927 "2026-02-16T22:07:25Z")

</div>

Hello! I am new to Bayesian inferencing, and my thesis has grown to require some advanced modeling techniques that I am a little out of depth in performing. To give a general outline, I have performed an ecological tro…

---

## [Exact, approximate, and minimum count data](https://discourse.mc-stan.org/t/exact-approximate-and-minimum-count-data/40872)

<div class="topic-metadata">

**Author:** [@jacollings](https://discourse.mc-stan.org/u/jacollings)\
**Replies:** 4\
**Last updated:** [February 4, 2026, 10:06pm UTC](https://discourse.mc-stan.org/t/exact-approximate-and-minimum-count-data/40872 "2026-02-04T22:06:37Z")

</div>

Hi all, I’m working with some data on the abundance of a variety of plants. I’m hoping to work up to fitting some GLMs with these abundance data as the response. However, the abundance data is collected in an unstandard…

---

## [Power analysis for ordinal phylogenetic model](https://discourse.mc-stan.org/t/power-analysis-for-ordinal-phylogenetic-model/40883)

<div class="topic-metadata">

**Author:** [@Hanz](https://discourse.mc-stan.org/u/Hanz)\
**Replies:** 1\
**Last updated:** [January 31, 2026, 6:28pm UTC](https://discourse.mc-stan.org/t/power-analysis-for-ordinal-phylogenetic-model/40883 "2026-01-31T18:28:49Z")

</div>

Hello, We were asked to provide the statistical power of our ordinal model. Initially, we did not find evidence for any effects and because the sample size is small (n = 36), the model may have low power to reveal any e…

---

## [Vector Autoregressive Structure](https://discourse.mc-stan.org/t/vector-autoregressive-structure/40862)

<div class="topic-metadata">

**Author:** [@cMiIIer](https://discourse.mc-stan.org/u/cMiIIer)\
**Replies:** 3\
**Last updated:** [January 31, 2026, 10:49am UTC](https://discourse.mc-stan.org/t/vector-autoregressive-structure/40862 "2026-01-31T10:49:22Z")

</div>

Hello! As part of my thesis, I conducted a mesocosm experiment using a community of organisms and we are curious about how the community we curated performed. As a part of it I am trying to fit each trophic level into a…

---

## [How to specify weakly informative priors for beta regression with 10 predictors?](https://discourse.mc-stan.org/t/how-to-specify-weakly-informative-priors-for-beta-regression-with-10-predictors/40786)

<div class="topic-metadata">

**Author:** [@spn](https://discourse.mc-stan.org/u/spn)\
**Replies:** 16\
**Last updated:** [January 29, 2026, 5:07pm UTC](https://discourse.mc-stan.org/t/how-to-specify-weakly-informative-priors-for-beta-regression-with-10-predictors/40786 "2026-01-29T17:07:30Z")

</div>

Hi all, I’m running a beta regression with 10 continuous predictors. I’m fairly new to Bayesian modeling (about a week in), and I’m trying to set weakly informative priors. I specified the following after standardizing …

---

## [Generating parameter values for a new level in multivariate model with group correlations](https://discourse.mc-stan.org/t/generating-parameter-values-for-a-new-level-in-multivariate-model-with-group-correlations/40875)

<div class="topic-metadata">

**Author:** [@amynang](https://discourse.mc-stan.org/u/amynang)\
**Replies:** 1\
**Last updated:** [January 29, 2026, 11:10am UTC](https://discourse.mc-stan.org/t/generating-parameter-values-for-a-new-level-in-multivariate-model-with-group-correlations/40875 "2026-01-29T11:10:50Z")

</div>

Suppose I have the following model: bf( y1 ~ a / (1 + exp(b\*x)), a ~ 1 + (1|p|z), b ~ 1 + (1|p|z), nl = T ) + bf( y2 ~ a / (1 + exp(b\*x)), a ~ 1 + (1|p|z), b ~ 1 + (1|p|z), …

---

## [Binomial GLMM Assumptions](https://discourse.mc-stan.org/t/binomial-glmm-assumptions/30254)

<div class="topic-metadata">

**Author:** [@Hunter24](https://discourse.mc-stan.org/u/Hunter24)\
**Replies:** 15\
**Last updated:** [January 28, 2026, 6:40pm UTC](https://discourse.mc-stan.org/t/binomial-glmm-assumptions/30254 "2026-01-28T18:40:27Z")

</div>

I am using a binomial GLMM and am confused on how to test for homoscedasticity of residuals. When I use normal difference residuals it shows heteroscedasticity, but when I use pearsons residuals it shows more of a homos…

---

## [Hierarchical model to aggregate summary statistics and estimate a product of proportions ($P1 \\times P2$)](https://discourse.mc-stan.org/t/hierarchical-model-to-aggregate-summary-statistics-and-estimate-a-product-of-proportions-p1-times-p2/40798)

<div class="topic-metadata">

**Author:** [@arc\_circle\_square](https://discourse.mc-stan.org/u/arc_circle_square)\
**Replies:** 1\
**Last updated:** [January 9, 2026, 10:12pm UTC](https://discourse.mc-stan.org/t/hierarchical-model-to-aggregate-summary-statistics-and-estimate-a-product-of-proportions-p1-times-p2/40798 "2026-01-09T22:12:37Z")

</div>

I am trying to estimate the proportion of U.S. adults who use chatbots as a “friend.” (That’s not the exact RQ but it’s a good enough stand-in!) I am estimating this as a product of two probabilities: P = P1 \\times P2. …

---

## [Meta-analysis in brms -- Combining se() and mi()](https://discourse.mc-stan.org/t/meta-analysis-in-brms-combining-se-and-mi/16597)

<div class="topic-metadata">

**Author:** [@stu.donovan](https://discourse.mc-stan.org/u/stu.donovan)\
**Replies:** 3\
**Last updated:** [January 5, 2026, 4:09pm UTC](https://discourse.mc-stan.org/t/meta-analysis-in-brms-combining-se-and-mi/16597 "2026-01-05T16:09:52Z")

</div>

Hi there, I am using brms to estimate my fairly conventional meta-analysis model as follows: yi | se(sei, sigma = TRUE) ~ 1 + mods In my “new to brms” precociousness, I am now wondering if it’s possible to extend this …

[Next page](https://discourse.mc-stan.org/tag/techniques/14.md?match_all_tags=true&page=1&tags%5B%5D=techniques)
