I’m trying to run a brms model on continuous response data with two multileveled categorical predictors and a random intercept. My response data distribution is as in Figure 1. So The minimum is 0 and maximum 180.

I believe the distribution that describes my data best is a half-normal but I don’t really know how to implement it (it’s not predefined in brms family function). Distributions usually used for response time data (a bit similar to mine) require responses greater than 0.

I’ve tried fitting the model with gaussian family which resulted in a pretty bad fit (pp_check on Figure 2.)

So, the response was circular but I’ve figured that if I take a part of that circle, so distance between two points on the wheel, so my “correctness” variable then it’s no longer circular.

Now that I’ve written it all down it seems like it’s a mixture of uniform and gaussian maybe.

I’ve tried to run my model with taking the log of my outcome variable as in your example and using family gaussian with “identity” link. Unfortunately I got this error for all of my chains:

SAMPLING FOR MODEL ‘87a5d6d2435e3243f9c7416c4e9a45fe’ NOW (CHAIN 1).

Chain 1: Initialization between (-2, 2) failed after 100 attempts.

[1] “Error in sampler$call_sampler(args_list[[i]]) : Initialization failed.”

error occurred during calling the sampler; sampling not done

Thank for sharing Zuzanna! I do have a similar looking distribution as you. I have been trying to solve this distributional problem myself for a long time now - your solution looks pretty good!
I was just wondering, did you also consider the negative binomial distribution (or zero-inflated models)? Find it hard to understand whether it is okay to use such a distribution for a non-count variable (but with count properties), does anyone have an idea on this?

No, I haven’t tried the neg binomial nor the zero-inflated (it’s just small values that are the most probable, not necessarily just zeroes so I wasn’t sure if that would be the right solution).
Cheers,
Zuzanna

You could try geometric or gamma families.
If you have zeros, it won’t allow you to use gamma distributions, but hurdle_gamma allows for zero values (where otherwise only positive reals are allowed).

A negative binomial distribution I don’t think explicitly implies integer values.

I’m fairly certain that in brms, I think you get error flagged, if you try to run a model with non integer response, using family=poisson. But I’m not certain the same is true in negbinomial.