-
-
Notifications
You must be signed in to change notification settings - Fork 198
Closed
Description
Description
The lb_constrain and ub_constrain functions were recently updated to check that the provided limits are finite, however this is breaking some stan_surv models in the rstanarm package.
The stan_surv function uses a conditional to determine whether some parameters should be lower-bounded at zero or at negative_infinity() (i.e., unrestricted):
/**
* Return the lower bound for the baseline hazard parameters
*
* @param type An integer indicating the type of baseline hazard
* @return A real
*/
real coefs_lb(int type) {
real lb;
if (type == 2) // B-splines, on log haz scale
lb = negative_infinity();
else if (type == 3) // piecewise constant, on log haz scale
lb = negative_infinity();
else
lb = 0;
return lb;
}
The recent updates to the constrains is then causing these stan_surv models to fail: https://discourse.mc-stan.org/t/stan-surv-crashes-r-repeatedly/20715/11
Current Version:
v4.0.0
Metadata
Metadata
Assignees
Labels
No labels