drizopoulos / JMbayes

Joint Models for Longitudinal and Survival Data using MCMC
59 stars 24 forks source link

Manually setting priors. #71

Closed mpirikL closed 3 years ago

mpirikL commented 4 years ago

Good day, I have attempted to manually set priors in the mvglmer() function, but only for one set of coefficients, the fixed effects. So, I add the following in the call priors=list(taus_betas=0.1) and all the different possible ways to write the same thing, like priors=list(taus_betas=c(0.1,0.1,0.1,0.1)) (since I have 4 longitudinal response variables) and priors=list("taus_betas"=0.1). However, I get the error

Error in if (use.names && nt[i] == nc[i]) dQuote(nt[i]) else i : 
  missing value where TRUE/FALSE needed

When I remove priors=list(taus_betas=0.1) it runs without problem. Is there a special way to set the priors manually that I can not see? Must one set all the priors manually if one is going to set one of them?

Thanks much for your help. L.W.

drizopoulos commented 3 years ago

Try the newer JMbayes2: https://drizopoulos.github.io/JMbayes2/