Comments (2)
@bgoodri Can you take a look at this? It's also breaking some code from Regression and Other stories (see below for more details).
@invertdna Thanks for reporting this. I think this is a bug introduced with the latest update when we switched to using Stan 2.26. This happens when there's only 1 predictor (it should work fine if you add another variable on the RHS of the formula) when using stan_lm
or stan_polr
.
@bgoodri any idea why this fails with 2.26? This causes some of the examples from Regression and Other Stories to error that used to run fine. For example, this stan_polr
code from ROS now errors with 2.26 because it only has 1 predictor:
The unit vector array in polr.stan
is declared with
array[K > 1] unit_vector[K] u;
so if there's only 1 predictor (K=1) it would be array[0] unit_vector[0] u
. But I don't see why that should be a problem since it's only used in transformed parameters if K > 1
and it used to be fine in earlier versions. Also the error message says that the target distribution must be continuous
, which doesn't seem relevant here:
Exception: Found dimension size one in unit vector declaration.
One-dimensional unit vector is discrete but the target distribution
must be continuous. variable=u; dimension size expression=K
from rstanarm.
The solution may be
array[K > 1] unit_vector[K > 1 ? K : 2] u;
which makes it size 2 when K=1 (it won't even get used so we can just do this to avoid error when K=1)
from rstanarm.
Related Issues (20)
- posterior_predict() fails with newdata in version 2.21.4 for stan_glmer model objects
- [QUESTION] `posterior_traj()` for `stan_mvmer` HOT 2
- Installation failure for `feature/survival`
- `stan_surv` exits with an error because of changes in `||` (R≥4.3) HOT 2
- Reminder to fix version numbers in Makevars files HOT 2
- Installation error HOT 7
- Question on "_NEW_"
- Current CRAN failures and potential removal HOT 3
- help to run stan_surv in rstanarm HOT 2
- Inconsistency of linear predictor values (numerical instability?)
- rstanarm does not support all link functions supported by glm{er}
- Unable to install Rstanarm for Docker Image
- Failure in test suite HOT 1
- `posterior_linpred()` for `stan_gamm4()` errors with 'Matrix' v1.6-4 HOT 9
- Some pp_check plotfuns give an error indicating a bug
- Compilation of 'rstanarm' survival extension failed HOT 7
- I can't install rstanarm from Github
- Segfault from C stack overflow for mips64el and risc64 architectures HOT 14
- Failing to link on Windows with RTools44 HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rstanarm.