Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid error for 1-D unit_vector #606

Merged
merged 1 commit into from
Oct 30, 2023
Merged

avoid error for 1-D unit_vector #606

merged 1 commit into from
Oct 30, 2023

Conversation

jgabry
Copy link
Member

@jgabry jgabry commented Oct 30, 2023

fixes #603

The unit_vector isn't actually used anywhere in the situation when it errors (when K isn't >1) so we just make it size 2 in that case to avoid Stan's error for 1-D unit vectors.

I also added tests for stan_lm and stan_polr to check that they now run with 1 predictor.

the unit_vector isn't actually used anywhere in the situation when it errors (when K isn't >1) so we just make it size 2 in that case to avoid Stan's error for 1-D unit vectors.

fixes #603
@jgabry jgabry requested a review from bgoodri October 30, 2023 21:15
@bgoodri bgoodri merged commit a9889e6 into master Oct 30, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: One-dimensional unit vector is discrete
2 participants