You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defining a size 0 correlation matrix leads to std::bad_alloc in rstan. This is related to #2588, where it is suggested that corr_matrix and related types should be able to work for size 0. #2588 was closed, but I think the "allow size 0" issue was never addressed.
Reproducible Steps:
This zip file contains an R file and stan file (run with rstan), illustrating the issue: corrmat.zip
Current Output:
std::bad_alloc if the corr_matrix size is 0.
Expected Output:
Optimally, this model would still sample when the corr_matrix size is 0.
Current Version:
I am using rstan 2.21.2 with R 4.0.2. I also reproduced with CmdStan 2.24.0, which reported:
Exception initializing step size. Posterior is improper. Please check your model.
The text was updated successfully, but these errors were encountered:
Summary:
Defining a size 0 correlation matrix leads to std::bad_alloc in rstan. This is related to #2588, where it is suggested that corr_matrix and related types should be able to work for size 0. #2588 was closed, but I think the "allow size 0" issue was never addressed.
Reproducible Steps:
This zip file contains an R file and stan file (run with rstan), illustrating the issue: corrmat.zip
Current Output:
std::bad_alloc if the corr_matrix size is 0.
Expected Output:
Optimally, this model would still sample when the corr_matrix size is 0.
Current Version:
I am using rstan 2.21.2 with R 4.0.2. I also reproduced with CmdStan 2.24.0, which reported:
Exception initializing step size.
Posterior is improper. Please check your model.
The text was updated successfully, but these errors were encountered: