Hello everyone,
I would like to fit a hierarchical Gamma model for time-to-event data with random scale and random shape. Fitting the random scale model works well as follows:
fit5 <- brm(formula=AVALM | cens(CNSR) ~ 1 + (1|DIAG),
data = cancer, family=brmsfamily(family="Gamma",link="log"),
warmup = 1000,
iter = 2000, chains = 4, control = list(adapt_delta = 0.99),seed=2024)
However, when I try to additionally add a random scale as follows:
brmsForm3 <- bf(AVALM | cens(CNSR) ~ 1 + (1|DIAG), shape ~ 1 + (1|DIAG))
fit5 <- brm(formula=brmsForm3,
data = cancer, family=brmsfamily(family="Gamma",link="log"),
warmup = 1000,
iter = 2000, chains = 4, control = list(adapt_delta = 0.99),seed=2024)
I get the following error message:
Ill-typed arguments supplied to infix operator /. Available signatures:
(row_vector, matrix) => row_vector
(matrix, matrix) => matrix
(complex_row_vector, complex_matrix) => complex_row_vector
(complex_matrix, complex_matrix) => complex_ma
Following the same principle, I could already fit a Weibull and a log-normal model without any such issues. Does anyone have any idea why the Gamma model causes trouble?
Your help would be greatly appreciated.
Best wishes,
Katrin