How to place multiple IDs in survival analysis using the BRMS Package?

Hi,

I am running survival analysis models (time to event regressions). In the BRMS package, I don’t know how to place multiple IDs in the model. For instance, my unit of analysis, country-year, is measured at different times. There are over 100 countries in my dataset. On average, each country is measured 20-50 times, depending on the number of years of existence, in my dataset. So, I should account for the multiple IDs for each country. I have the duration, event, and ID (for countries). But I don’t know how to specify in the brm function. brm(duration | cens(event) ~., data = ). I wish to place the ID (country) inside the function. I checked the BRMS documentation, but I couldn’t find any. Kindly let me know if anyone knows about that.

Thanks.

To clarify, in your dataset is it that a given country is assessed repeatedly until an event occurs?

You can account for this by adding a random intercept for each country, you can see some examples of specifying the model on this page: https://rdrr.io/cran/brms/man/kidney.html

Hi,

    Yes,  the country is assessed until the event happens. I thought of  adding a random intercept, but there are many countries (170 separate  IDs).  So when I tried to fit the model,  I got sampling errors. 

Thanks.

Can you post your model specification and the error you get?