sambrilleman / rstanarm

rstanarm R package for Bayesian applied regression modeling
http://mc-stan.org/interfaces/rstanarm.html
GNU General Public License v3.0
0 stars 1 forks source link

Choose the most appropriate class for models returned by stan_mvmer, stan_jm, etc #32

Open sambrilleman opened 7 years ago

sambrilleman commented 7 years ago

At the moment stan_jm returns an object of class "stanjm". This was necessary since some methods need to handle the fitted model differently from the other stanreg objects. The main difference is that "stanjm" models have distinct submodels, whereas the models returned by existing rstanarm modelling functions do not.

But, with the possible introduction of modelling functions like stan_mvmer and/or stan_survtd with competing risks etc there will potentially be models that a so-called mutivariate, in that they consist of distinct regression submodels, but are not "joint models" per se.

Therefore it might make more sense to change the class to "stanmvreg", and just make joint models a special case that can be identified by the is.stanjm() function and handled appropriately.