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

Bugs in jm.stan on master branch #25

Closed sambrilleman closed 7 years ago

sambrilleman commented 7 years ago

Typo here, should be "upbound" instead of "lobound" https://github.com/sambrilleman/rstanarm/blob/master/exec/jm.stan#L759

Here, the correction to eta appears to be always carried out, but it should only be done if the model has no intercept?? https://github.com/sambrilleman/rstanarm/blob/master/exec/jm.stan#L765

Rather than correcting these on the master now, I think I'll correct them on the develop branch and wait till that is merged into the master to close this issue.

sambrilleman commented 7 years ago

In addition, here is another instance of where the correction to eta is always carried out, but should only be carried out if model has no intercept... https://github.com/sambrilleman/rstanarm/blob/master/inst/chunks/jm_functions.stan#L93

My hunch is that these bugs will cause the intercept terms in the longitudinal submodel (https://github.com/sambrilleman/rstanarm/blob/master/exec/jm.stan#L765) and in the event submodel (https://github.com/sambrilleman/rstanarm/blob/master/inst/chunks/jm_functions.stan#L93) to be incorrect. But they shouldn't affect the other coefficients.

sambrilleman commented 7 years ago

This should be resolved on the develop branch, here: https://github.com/sambrilleman/rstanarm/blob/develop/inst/chunks/eta_intercept_mvmer.stan

But not yet on the master.