Kumaraswamy regression in BRMS?

How to specify Kumaraswamy distribution with brms custom_family to fit a regression? Wanna compare results with beta regression.

1 Like

I am not familiar with Kumaraswamy distributions, so I can’t give specific advice. Just in case you haven’t seen it yet, I am mentioning this vignette:

It helped me a lot in specifying my custom family.

4 Likes

Unfortunately, it uses beta_binomial that is already implemented in Stan. So it does not help me to define a distribution from scratch.

Of course it does. Just replace the custom_family bits with the code for the Kumaraswamy distribution.

3 Likes

To expand a bit on what @maxbiostat wrote: you need the function to return the logarithm of the probability density function (that’s what the _lpdf suffix stand for), so you can take the PDF as shown on Wikipedia, take the logarithm and implement that directly with built-in arithmetic operations.

Best of luck with your model!

2 Likes