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

find_predictors() with multiple strata() variables in clogit() #821

Closed
vincentarelbundock opened this issue Oct 25, 2023 · 1 comment · Fixed by #822
Closed

find_predictors() with multiple strata() variables in clogit() #821

vincentarelbundock opened this issue Oct 25, 2023 · 1 comment · Fixed by #822
Assignees
Labels
bug 🐛 Something isn't working

Comments

@vincentarelbundock
Copy link
Contributor

An error is produced when strata() includes two variables:

library(insight)
library(survival)
mod <- clogit(am ~ mpg + cyl + mpg:cyl + strata(carb, gear), data = mtcars) 
find_predictors(mod)
# Error in str2lang(termtext): <text>:1:5: unexpected ','
# 1: carb,
#         ^
@vincentarelbundock vincentarelbundock changed the title find_predictors() does not handle multiple strata() variables in clogit() find_predictors() with multiple strata() variables in clogit() Oct 25, 2023
@strengejacke strengejacke self-assigned this Oct 25, 2023
@strengejacke strengejacke added the bug 🐛 Something isn't working label Oct 25, 2023
strengejacke added a commit that referenced this issue Oct 25, 2023
…822)

* `find_predictors()` with multiple `strata()` variables in `clogit()`
Fixes #821

* fix tests

* nolint

* docs
@vincentarelbundock
Copy link
Contributor Author

Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants