Hello,

I would like to implement a censored dirichlet regression.

In brms would be expressed by the formula

```
A | cens(censor_variable) ~ y
```

But unfortunately, from brms

```
Argument 'cens' is not supported for family 'dirichlet(logit)'.
```

Given that for a normal distribution the easy implementation is

```
for (n in 1:N) {
// special treatment of censored data
if (cens[n] == 0) {
target += normal_lpdf(Y[n] | mu[n], sigma);
} else if (cens[n] == 1) {
target += normal_lccdf(Y[n] | mu[n], sigma);
}
}
```

I am wondering (and I donâ€™t have much expertise) how would it translate to dirichlet.

Thanks!

1 Like

Stan doesnâ€™t have a CDF for the dirichlet so youâ€™re down to â€ścan I implement that?â€ť. Since the Dirichlet is a multivariate random variable that gets awkward but depending on how generic and fast you want it to be there might be a solution.

4 Likes

Thatâ€™s unfortunate. What about I do a well constrained **beta regression** for each of the components.

Again the implementation seems straightforward

```
if (cens[n] == 0) {
target += beta_lpdf(Y[n] | mu[n] * phi, (1 - mu[n]) * phi);
} else if (cens[n] == 1) {
target += beta_lccdf(Y[n] | mu[n] * phi, (1 - mu[n]) * phi);
}
```

However I would like to make sure I can constrain the model enough. For example:

- constrain the intercepts to sum to 1
- donâ€™t constrain the slopes (I am not sure this can be algebrically correctly constrained)
- constrain the variance (how ?) or use a unique variance for all betas (does this replicate the effect of a single variance parametrisation from dirichlet?)

What would be the intuitive difference between dirichlet regression and many constrained beta regressions?

Thanks!