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

null predictor space: "Error in zzs$coefficients[u, 1] : subscript out of bounds" #149

Open
adw96 opened this issue May 15, 2023 · 0 comments

Comments

@adw96
Copy link
Contributor

adw96 commented May 15, 2023

The cryptic error message Error in zzs$coefficients[u, 1] : subscript out of bounds arises when the single predictor variable is all zeroes. (This sounds trivial that may happen in automated large scale data analysis.)

### ideal behaviour
lm(rnorm(10) ~ rep(0, 10))
glm(rpois(10, 10) ~ rep(0, 10), family="poisson")
rigr::regress("rate",
              formula = rpois(10, 10) ~ rep(0, 10) + rnorm(10),
              data=df)
rigr::regress("mean",
              formula = rpois(10, 10) ~ rep(0, 10) + rnorm(10),
              data=df)

### error with unhelpful error message
rigr::regress("rate",
              formula = rpois(10, 10) ~ rep(0, 10),
              data=df)
rigr::regress("mean",
              formula = rpois(10, 10) ~ rep(0, 10),
              data=df)
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

No branches or pull requests

1 participant