# Regression with censored input data

**URL:** <https://discourse.pymc.io/t/regression-with-censored-input-data/17406>\
**Category:** version agnostic\
**Tags:** bambi, modeling\
**Created:** [October 28, 2025, 10:21am UTC](https://discourse.pymc.io/t/regression-with-censored-input-data/17406 "2025-10-28T10:21:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leomein](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@leomein](https://discourse.pymc.io/u/leomein)\
**Post date:** [October 28, 2025, 10:21am UTC](https://discourse.pymc.io/t/regression-with-censored-input-data/17406/1 "2025-10-28T10:21:08Z")

</div>

Hi all,

I have a situation where my response variable but also one of the independent variables are censored. I’ve found a lot online on the topic of a censored response variable but not much on the case of censored input variables. Is it safe to just remove the data points for which the value of the independent variable is censored? Or are there better ways to deal with this?

I’ve been using the `censored` function in bambi also on the independent variable and I can fit the model but I don’t know if the output is meaningful (probably not?). I’m also wondering about truncated input data. If anyone can point me to some online ressources on this topic that would be helpful, too.

Thanks!

---

<div class="post-metadata">

**Author:** ![tcapretto](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/tcapretto/32/4902_2.png) [@tcapretto](https://discourse.pymc.io/u/tcapretto)\
**Post date:** [October 28, 2025, 12:11pm UTC](https://discourse.pymc.io/t/regression-with-censored-input-data/17406/2 "2025-10-28T12:11:04Z")

</div>

I have not thought about this previously. But I do know it’s not possible to handle your situation (at least straightforwardly) with Bambi.

All models you create with Bambi assume covariates are fixed. However, if one of those is censored, I _think_ you will need to model it as random, assigning a proper probability distribution. According to [Benjamin Trueman: Regression models with censored predictors](https://bentrueman.github.io/posts/2023-03-13-regression-models-with-censored-predictors/), treating the censored values as a missing data problem with the relevant lower or upper bound is a valid approach to your problem. If that is the case, PyMC should have you covered.

---

<div class="post-metadata">

**Author:** ![leomein](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@leomein](https://discourse.pymc.io/u/leomein)\
**Post date:** [October 28, 2025, 3:53pm UTC](https://discourse.pymc.io/t/regression-with-censored-input-data/17406/3 "2025-10-28T15:53:05Z")

</div>

Okay, thanks a lot!
