# \#missing-data

**URL:** https://discourse.mc-stan.org/tag/missing-data/186.md?match_all_tags=true&tags%5B%5D=missing-data

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

---

## [How to handle NA values in multivariate models?](https://discourse.mc-stan.org/t/how-to-handle-na-values-in-multivariate-models/18800)

<div class="topic-metadata">

**Author:** [@Jack\_A](https://discourse.mc-stan.org/u/Jack_A)\
**Replies:** 8\
**Last updated:** [June 19, 2025, 5:22pm UTC](https://discourse.mc-stan.org/t/how-to-handle-na-values-in-multivariate-models/18800 "2025-06-19T17:22:32Z")

</div>

Hi everyone, I’m fairly new to Bayesian modelling and brms ,and this is my first time posting. My aim is to estimate whether there are among-individual correlations between an animals activity when measured in Context 1…

---

## [Missing data in a monotonic variable](https://discourse.mc-stan.org/t/missing-data-in-a-monotonic-variable/39033)

<div class="topic-metadata">

**Author:** [@CurtisAtkisson](https://discourse.mc-stan.org/u/CurtisAtkisson)\
**Replies:** 5\
**Last updated:** [March 13, 2025, 8:12pm UTC](https://discourse.mc-stan.org/t/missing-data-in-a-monotonic-variable/39033 "2025-03-13T20:12:11Z")

</div>

I have data that are missing in a monotonic predictor variable. Is it possible to deal with this in brms? If not in the brms interface, is this possible in Stan at all? And what would be the easiest route to go from brms…

---

## [NLME model in STAN for missing + unbalanced longitudinal data](https://discourse.mc-stan.org/t/nlme-model-in-stan-for-missing-unbalanced-longitudinal-data/36703)

<div class="topic-metadata">

**Author:** [@michael3](https://discourse.mc-stan.org/u/michael3)\
**Replies:** 20\
**Last updated:** [October 21, 2024, 6:54pm UTC](https://discourse.mc-stan.org/t/nlme-model-in-stan-for-missing-unbalanced-longitudinal-data/36703 "2024-10-21T18:54:31Z")

</div>

Divergent issues; R-hat issues; ESS issues. Any tips/advice is much appreciated. My thoughts on potential issues: Maybe it’s how I’m dealing with unbalanced longitudinal data portion i.e. if (i != previous\\\_id)? I tho…

---

## [How to handle missing group ids in hierarchical model with group level effect](https://discourse.mc-stan.org/t/how-to-handle-missing-group-ids-in-hierarchical-model-with-group-level-effect/36830)

<div class="topic-metadata">

**Author:** [@biobayes](https://discourse.mc-stan.org/u/biobayes)\
**Replies:** 3\
**Last updated:** [October 7, 2024, 3:24am UTC](https://discourse.mc-stan.org/t/how-to-handle-missing-group-ids-in-hierarchical-model-with-group-level-effect/36830 "2024-10-07T03:24:40Z")

</div>

Hey I want to model data where repeated measurements where taken from animals. I want to compare different treatment groups while correcting for animal specific effects. The model I want to fit in BRMS looks something…

---

## [Model comparison for multiple imputation with brm\_multiple](https://discourse.mc-stan.org/t/model-comparison-for-multiple-imputation-with-brm-multiple/36666)

<div class="topic-metadata">

**Author:** [@jweverka](https://discourse.mc-stan.org/u/jweverka)\
**Replies:** 1\
**Last updated:** [September 20, 2024, 5:14pm UTC](https://discourse.mc-stan.org/t/model-comparison-for-multiple-imputation-with-brm-multiple/36666 "2024-09-20T17:14:16Z")

</div>

Similar issue to the one here: Using model comparison (loo or waic) after imputation, but I can’t find any discussion that is more recent than 2021, so I’d like to revive the topic. Using brms. I have a dataset with abo…

---

## [Mi(): standard error or standard deviation?](https://discourse.mc-stan.org/t/mi-standard-error-or-standard-deviation/35546)

<div class="topic-metadata">

**Author:** [@aeiche01](https://discourse.mc-stan.org/u/aeiche01)\
**Replies:** 1\
**Last updated:** [June 22, 2024, 3:03am UTC](https://discourse.mc-stan.org/t/mi-standard-error-or-standard-deviation/35546 "2024-06-22T03:03:56Z")

</div>

I’m using the mi() function in a brm() model where I have measurement error in my y variable. I’m trying to see whether to use standard error or standard deviation, but the one to use seems to change depending on the doc…

---

## [Importing dataset with missing variables](https://discourse.mc-stan.org/t/importing-dataset-with-missing-variables/34782)

<div class="topic-metadata">

**Author:** [@pehkawn](https://discourse.mc-stan.org/u/pehkawn)\
**Replies:** 1\
**Last updated:** [April 13, 2024, 1:11am UTC](https://discourse.mc-stan.org/t/importing-dataset-with-missing-variables/34782 "2024-04-13T01:11:40Z")

</div>

I am trying to import a dataset (y\_raw) with multiple missing variables into Stan (using cdstan. I have replaced any missing values (NAs) with an easily recognizable number (-999) outside the observed data’s interval. I …

---

## [Imputing cross conditional missing data in an "observation matrix" as input for further analysis](https://discourse.mc-stan.org/t/imputing-cross-conditional-missing-data-in-an-observation-matrix-as-input-for-further-analysis/34640)

<div class="topic-metadata">

**Author:** [@Angelo\_D\_Ambrosio](https://discourse.mc-stan.org/u/Angelo_D_Ambrosio)\
**Replies:** 0\
**Last updated:** [March 29, 2024, 5:04pm UTC](https://discourse.mc-stan.org/t/imputing-cross-conditional-missing-data-in-an-observation-matrix-as-input-for-further-analysis/34640 "2024-03-29T17:04:22Z")

</div>

Hello, I have a nasty missing data situation. I’m trying to model some COVID outbreak data in long term care facilities. For each facility, in a given moment in time, I have the number of residents divided into a matri…

---

## [Analyzing multiple imputed datasets in brms](https://discourse.mc-stan.org/t/analyzing-multiple-imputed-datasets-in-brms/34396)

<div class="topic-metadata">

**Author:** [@owen\_island](https://discourse.mc-stan.org/u/owen_island)\
**Replies:** 2\
**Last updated:** [March 9, 2024, 10:17am UTC](https://discourse.mc-stan.org/t/analyzing-multiple-imputed-datasets-in-brms/34396 "2024-03-09T10:17:46Z")

</div>

Hello, I am running a beta\_binomial model in brms, and due to the mi() function not working when I use this format i opted for the Blimp Software created by Craig Enders to do the imputations. I saved n = 10 datasets, a…

---

## [Simple selection model for MNAR data](https://discourse.mc-stan.org/t/simple-selection-model-for-mnar-data/34234)

<div class="topic-metadata">

**Author:** [@simonbrauer](https://discourse.mc-stan.org/u/simonbrauer)\
**Replies:** 2\
**Last updated:** [February 27, 2024, 12:45pm UTC](https://discourse.mc-stan.org/t/simple-selection-model-for-mnar-data/34234 "2024-02-27T12:45:12Z")

</div>

Others have expressed interest in Bayesian models that account for data missing not at random (MNAR, where the probability of missing Y is dependent on the values of Y) both here on Discourse (sere here, here, here, and h…

---

## [Obtaining posterior for left-censored survival observations with STAN](https://discourse.mc-stan.org/t/obtaining-posterior-for-left-censored-survival-observations-with-stan/33424)

<div class="topic-metadata">

**Author:** [@Greg1](https://discourse.mc-stan.org/u/Greg1)\
**Replies:** 1\
**Last updated:** [November 24, 2023, 9:06pm UTC](https://discourse.mc-stan.org/t/obtaining-posterior-for-left-censored-survival-observations-with-stan/33424 "2023-11-24T21:06:36Z")

</div>

Hi, I have noticed that documentation for survival models is lacking and wondering if anyone can help me with or point me to resources that can help with my modeling challenges. I am trying to build a survival model for…

---

## [Guidelines for Practical Imputation with Stan?](https://discourse.mc-stan.org/t/guidelines-for-practical-imputation-with-stan/32024)

<div class="topic-metadata">

**Author:** [@wgoette](https://discourse.mc-stan.org/u/wgoette)\
**Replies:** 4\
**Last updated:** [September 6, 2023, 9:06pm UTC](https://discourse.mc-stan.org/t/guidelines-for-practical-imputation-with-stan/32024 "2023-09-06T21:06:41Z")

</div>

I’ve been trying to wrap my head around how to best go about multiple imputation with Stan code, and I’ve read a number of different posts and vignettes on this forum, StackExchange, and various GitHubs. While all helpfu…

---

## [Online talk Aug 8, 2023 - Covid 19 and Non-random Missing Data](https://discourse.mc-stan.org/t/online-talk-aug-8-2023-covid-19-and-non-random-missing-data/32145)

<div class="topic-metadata">

**Author:** [@mitzimorris](https://discourse.mc-stan.org/u/mitzimorris)\
**Replies:** 3\
**Last updated:** [August 9, 2023, 2:08pm UTC](https://discourse.mc-stan.org/t/online-talk-aug-8-2023-covid-19-and-non-random-missing-data/32145 "2023-08-09T14:08:50Z")

</div>

hi everyone, I’m going to be giving an online talk: Lessons from COVID-19: Non-random Missing Data and Its Consequences DESCRIPTION: A fundamental challenge for survey and observational datasets is that not all recor…

---

## [Inquiry about the Pooling Function 'brm\_multiple' and Consideration of Zhou & Reiter's Recommendations](https://discourse.mc-stan.org/t/inquiry-about-the-pooling-function-brm-multiple-and-consideration-of-zhou-reiters-recommendations/31637)

<div class="topic-metadata">

**Author:** [@Shai\_Shachar](https://discourse.mc-stan.org/u/Shai_Shachar)\
**Replies:** 1\
**Last updated:** [June 6, 2023, 2:43pm UTC](https://discourse.mc-stan.org/t/inquiry-about-the-pooling-function-brm-multiple-and-consideration-of-zhou-reiters-recommendations/31637 "2023-06-06T14:43:38Z")

</div>

Hello everyone, I hope you’re all doing well. I have a couple of questions regarding the ‘brm\_multiple’ pooling function in the ‘brms’ package for Bayesian statistical analysis in R. I would greatly appreciate your insi…

---

## [Avoiding identification issues for multiple instances of imputed data in measurement model](https://discourse.mc-stan.org/t/avoiding-identification-issues-for-multiple-instances-of-imputed-data-in-measurement-model/31427)

<div class="topic-metadata">

**Author:** [@Mark\_Himmelstein](https://discourse.mc-stan.org/u/Mark_Himmelstein)\
**Replies:** 2\
**Last updated:** [May 22, 2023, 3:46pm UTC](https://discourse.mc-stan.org/t/avoiding-identification-issues-for-multiple-instances-of-imputed-data-in-measurement-model/31427 "2023-05-22T15:46:45Z")

</div>

I’m working on a model of advice taking. The full model is fairly complex, so I’m going to start with a simplified version and can include the more complicated version if it comes to it. The basic idea is I am testing h…

---

## [Imputing missing responses in multivariate ordinal data](https://discourse.mc-stan.org/t/imputing-missing-responses-in-multivariate-ordinal-data/21644)

<div class="topic-metadata">

**Author:** [@mantas.tartenas](https://discourse.mc-stan.org/u/mantas.tartenas)\
**Replies:** 15\
**Last updated:** [May 1, 2023, 10:19am UTC](https://discourse.mc-stan.org/t/imputing-missing-responses-in-multivariate-ordinal-data/21644 "2023-05-01T10:19:20Z")

</div>

Hi Paul and others, I was wandering if there is a way to do multiple imputation in a fully Bayesian way using brms in the case of discrete (ordinal) variables? Maybe using some latent variable approach and some other “t…

---

## [Modelling data with threshold limit in brms (hurdle, censoring?)](https://discourse.mc-stan.org/t/modelling-data-with-threshold-limit-in-brms-hurdle-censoring/31080)

<div class="topic-metadata">

**Author:** [@stat](https://discourse.mc-stan.org/u/stat)\
**Replies:** 3\
**Last updated:** [April 15, 2023, 12:16pm UTC](https://discourse.mc-stan.org/t/modelling-data-with-threshold-limit-in-brms-hurdle-censoring/31080 "2023-04-15T12:16:34Z")

</div>

Hey all, I have data mice were some molecule was measured in the blood over time. (after some challenge and after some treatment) Very low concentrations of the molecule fall below the detection threshold and get repor…

---

## [Subsetting missing data models for second-level predictor](https://discourse.mc-stan.org/t/subsetting-missing-data-models-for-second-level-predictor/30503)

<div class="topic-metadata">

**Author:** [@jflournoy](https://discourse.mc-stan.org/u/jflournoy)\
**Replies:** 0\
**Last updated:** [February 22, 2023, 8:20pm UTC](https://discourse.mc-stan.org/t/subsetting-missing-data-models-for-second-level-predictor/30503 "2023-02-22T20:20:39Z")

</div>

I have missing values on a second-level, i.e., group-level, predictor in a hierarchical model\[1\]. I can create a simultaneous model for this variable as a response using the missing data syntax in brms and essentially do…

---

## ["Expected non-array type after "array" declaration" error in ODE solver of Cmdstanr with missing data](https://discourse.mc-stan.org/t/expected-non-array-type-after-array-declaration-error-in-ode-solver-of-cmdstanr-with-missing-data/30339)

<div class="topic-metadata">

**Author:** [@geraltofrivia](https://discourse.mc-stan.org/u/geraltofrivia)\
**Replies:** 4\
**Last updated:** [February 10, 2023, 9:07am UTC](https://discourse.mc-stan.org/t/expected-non-array-type-after-array-declaration-error-in-ode-solver-of-cmdstanr-with-missing-data/30339 "2023-02-10T09:07:52Z")

</div>

I am trying to run a Measurement error model using CmdStan’s ode\_rk45 solver. The data set has T rows and 3 columns, only the first column’s data is available. But the initial condition is available for all 3 columns (th…

---

## [Missing categorical group data](https://discourse.mc-stan.org/t/missing-categorical-group-data/30131)

<div class="topic-metadata">

**Author:** [@epkanol](https://discourse.mc-stan.org/u/epkanol)\
**Replies:** 1\
**Last updated:** [January 22, 2023, 9:22pm UTC](https://discourse.mc-stan.org/t/missing-categorical-group-data/30131 "2023-01-22T21:22:31Z")

</div>

Hi, I’m trying to wrap my head around modeling of missing data, in particular of categorical group-level data. I’ve looked at Handle Missing Values with brms but could not find my use case described, so I’m wondering i…

---

## [Missing count data, use all possible combinations with fractional likelihood weights](https://discourse.mc-stan.org/t/missing-count-data-use-all-possible-combinations-with-fractional-likelihood-weights/30051)

<div class="topic-metadata">

**Author:** [@Angelo\_D\_Ambrosio](https://discourse.mc-stan.org/u/Angelo_D_Ambrosio)\
**Replies:** 3\
**Last updated:** [January 20, 2023, 10:41am UTC](https://discourse.mc-stan.org/t/missing-count-data-use-all-possible-combinations-with-fractional-likelihood-weights/30051 "2023-01-20T10:41:50Z")

</div>

Hello, I have a nasty analysis where data is full of holes (not collected by me). I tried to fill up the holes algorithmically (a damn huge effort) but still, in some situations that’s not possible: The above is an e…

---

## [Heckman selection model in brms for MNAR analysis](https://discourse.mc-stan.org/t/heckman-selection-model-in-brms-for-mnar-analysis/29774)

<div class="topic-metadata">

**Author:** [@TheissBendixen](https://discourse.mc-stan.org/u/TheissBendixen)\
**Replies:** 0\
**Last updated:** [December 13, 2022, 11:21am UTC](https://discourse.mc-stan.org/t/heckman-selection-model-in-brms-for-mnar-analysis/29774 "2022-12-13T11:21:01Z")

</div>

Is it possible to specify a Heckman selection model in brms for MNAR analysis? Here’s some background and an implementation in Stan: Fitting the Heckman selection model with Stan and R | A Random Walk Also related to: H…

---

## [Missing data of main effects in model with interaction terms](https://discourse.mc-stan.org/t/missing-data-of-main-effects-in-model-with-interaction-terms/5135)

<div class="topic-metadata">

**Author:** [@jeremy.koster](https://discourse.mc-stan.org/u/jeremy.koster)\
**Replies:** 17\
**Last updated:** [October 4, 2022, 12:29pm UTC](https://discourse.mc-stan.org/t/missing-data-of-main-effects-in-model-with-interaction-terms/5135 "2022-10-04T12:29:34Z")

</div>

Imagine that I’m considering a model with an interaction term between main effects, X1 and X2. However, X2 has missing data. Whereas I’ve seen multiple examples of missing data in Stan models, including this brms vignet…

---

## [Plotting conditional effects for model with subsetted missing data](https://discourse.mc-stan.org/t/plotting-conditional-effects-for-model-with-subsetted-missing-data/29008)

<div class="topic-metadata">

**Author:** [@scott.claessens](https://discourse.mc-stan.org/u/scott.claessens)\
**Replies:** 0\
**Last updated:** [October 3, 2022, 12:14am UTC](https://discourse.mc-stan.org/t/plotting-conditional-effects-for-model-with-subsetted-missing-data/29008 "2022-10-03T00:14:06Z")

</div>

I am trying to plot conditional effects predictions for the model fit3 included in the ?mi help documentation. The model fits fine, but I’m unable to run the conditional\_effects() function, or the fitted() function for t…

---

## [Can't understand an example for handling missing value in rstan](https://discourse.mc-stan.org/t/cant-understand-an-example-for-handling-missing-value-in-rstan/27940)

<div class="topic-metadata">

**Author:** [@Kat](https://discourse.mc-stan.org/u/Kat)\
**Replies:** 1\
**Last updated:** [June 26, 2022, 9:27pm UTC](https://discourse.mc-stan.org/t/cant-understand-an-example-for-handling-missing-value-in-rstan/27940 "2022-06-26T21:27:23Z")

</div>

I found this instructive post on github on how to deal with missing data but I am having a bit trouble understanding one detail:Multivariate normal fit with missing values in STAN · GitHub I pasted the code below so we …

---

## [Missing data that are missing at random and not supposed to be imputed](https://discourse.mc-stan.org/t/missing-data-that-are-missing-at-random-and-not-supposed-to-be-imputed/26646)

<div class="topic-metadata">

**Author:** [@Ivory\_Li](https://discourse.mc-stan.org/u/Ivory_Li)\
**Replies:** 1\
**Last updated:** [March 3, 2022, 4:23pm UTC](https://discourse.mc-stan.org/t/missing-data-that-are-missing-at-random-and-not-supposed-to-be-imputed/26646 "2022-03-03T16:23:56Z")

</div>

Hi, I’m using Stan to run an item response tree model. There are some data missing at random that are supposed to be missing instead of imputed given the research assumption. In this case, can I just specify the number …

---

## [Missing data problem: Missing probabilities in categorical distributions](https://discourse.mc-stan.org/t/missing-data-problem-missing-probabilities-in-categorical-distributions/25455)

<div class="topic-metadata">

**Author:** [@multinormal](https://discourse.mc-stan.org/u/multinormal)\
**Replies:** 2\
**Last updated:** [December 4, 2021, 10:39am UTC](https://discourse.mc-stan.org/t/missing-data-problem-missing-probabilities-in-categorical-distributions/25455 "2021-12-04T10:39:52Z")

</div>

Hi. How can I address the following missing data problem? I have a regression model (a meta-regression) that looks like this: Y \\sim N(X \\beta, \\Sigma) Y and \\Sigma are known. The estimation target is \\beta. Each row…

---

## [Missing binomial data with more than 1 trial](https://discourse.mc-stan.org/t/missing-binomial-data-with-more-than-1-trial/25360)

<div class="topic-metadata">

**Author:** [@pgok](https://discourse.mc-stan.org/u/pgok)\
**Replies:** 1\
**Last updated:** [November 29, 2021, 8:06pm UTC](https://discourse.mc-stan.org/t/missing-binomial-data-with-more-than-1-trial/25360 "2021-11-29T20:06:24Z")

</div>

So I am trying to figure out how to (properly) account for missing data when the outcome is binomial and there are more than one trial for the binomial distribution (i.e., it is not a bernouli distribution). For example…

---

## [Imputing New Poisson Response Variables in Model (brms)](https://discourse.mc-stan.org/t/imputing-new-poisson-response-variables-in-model-brms/8404)

<div class="topic-metadata">

**Author:** [@Cara\_Applestein](https://discourse.mc-stan.org/u/Cara_Applestein)\
**Replies:** 6\
**Last updated:** [November 22, 2021, 4:01pm UTC](https://discourse.mc-stan.org/t/imputing-new-poisson-response-variables-in-model-brms/8404 "2021-11-22T16:01:22Z")

</div>

I’m wondering if there is some other way to impute missing values within a brms call besides mice, since apparently the mice package does not support poisson-distributed variables. My response variable (NumARTR) is missi…

---

## [BRMS IRT and Missing Item Values](https://discourse.mc-stan.org/t/brms-irt-and-missing-item-values/24168)

<div class="topic-metadata">

**Author:** [@nmicatka](https://discourse.mc-stan.org/u/nmicatka)\
**Replies:** 1\
**Last updated:** [August 31, 2021, 1:00pm UTC](https://discourse.mc-stan.org/t/brms-irt-and-missing-item-values/24168 "2021-08-31T13:00:20Z")

</div>

I estimated an ordinal IRT model following the steps outlined in Bürkner (2020) here https://arxiv.org/pdf/1905.09501.pdf. In doing so, it seems that brms estimates a person’s latent trait score even when they have answ…

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