I am trying to do a mvglmer
fit with jmbayes
with the following snippet data of the first patient:
****id1 predx**
1011025 Prednisolone
**wks ecgrate_binary ecgpri_binary**
0 1 0
Here is the code:
mvFit1 <- mvglmer(ecgrate_binary ~treatment+ time+(time|id),
ecgpri_binary ~treatment+time +(1|id),
data = my_df,
families = list(binomial(link = "logit", binomial(link = "logit"),
engine ="STAN")
Which produces the error
Error in x$terms : object of type 'symbol' is not subsettable
In my data, I have repeated measurements for each patient, which are binary coded as 0 or 1 (i.e.ecgrate_binary
, ecgpri_binary
).
I have browsed stackoverflow and found similar issues; however, I have not been able to solve the problem. I, unfortunately, can't provide the link to the data as this is for my thesis.