I am trying to fit models using the Gamma family in brms for the first time. My dv is greater than zero and very skewed. I am using the following code:
b1 ← brm(total_sec ~ mat + mcat, data = data2, chains=2,
family = Gamma(link=“log”))
However, I keep getting the following error message:
Chain 1: Rejecting initial value:
Chain 1: Error evaluating the log probability at the initial value.
Chain 1: Exception: gamma_lpdf: Inverse scale parameter is 2331, but must be > 0!
I have tried constraining init=0, but that doesn’t seem to help. When it comes to the gamma function, I am not sure the constraint on the inverse scale parameter. Any help would be greatly appreciated.