Value range response value

Operating System: Ubuntu 16.04
Interface Version: R version 3.4.3 / rstanarm_2.15.3
Compiler/Toolkit: gcc version 5.4.0

Hi all,
is it possible to specify in rstanarm the maximum value for the response variable (or, more in general, the range of possible values)?

E.g., I have a Poisson response variable that by design takes values between 0 and 30. At the moment the (posterior) predicted values go beyond 30.


Not in the rstanarm package. I think you can do that in the brms package.

1 Like

Maybe Binomial model would be more appropriate? There are at least three basic cases for upper limited range where appropriate models would be Binomial (only 30 trials), Poisson with censoring (values larger than 30 are not observed), and Poisson with truncation (values larger than 30 are observed as 30). Which one of these you have?

1 Like

@avehtari: I think there is a misunderstanding. The variable (by definition) takes all the integers between 0 and 30 R c(0:30). With my sample of N = 720 each of the value occurs more than once. Make sense?

The binomial is the better model if your values are by definition constrained between 0 and 30. You can think of “trials” as “each person has 30 trials”. For example, these trials could be y out of 30 items solved, or y out of 30 tasks completed.
You can also conceptualize it as % solved or completed and try a beta-regression approach.

Yes, I figured this out the first time. Sorry my questions were not clear enough.


For constrained Poisson model an example could be a Geiger-counter counting. Basic Poisson model would be the number of events (which are not constrained), but maybe you have a device maxing at 30 counts and then you would have by definition integers between 0 and 30, but this is still different from the Binomial example.

In case you you are not certain whether Poisson is the best model for you, you could also tell what is your data collecting process instead that we try to figure it with 20 questions?

@avehtari Thank you, I see your point. @bgoodri gave me the answer I needed.