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

Model names when besides = TRUE and multiple models are passed #211

Open
dheimgartner opened this issue Oct 17, 2024 · 0 comments
Open

Model names when besides = TRUE and multiple models are passed #211

dheimgartner opened this issue Oct 17, 2024 · 0 comments

Comments

@dheimgartner
Copy link

Hi,

I've noted a very small issue when using beside = TRUE (e.g., for objects of class zeroinfl as in texreg:::extract.zeroinfl. Usually, multiple models can be passed to the texreg (API) functions and if passed as a named list the names are considered in the output. Alternatively, custom.names can be supplied. However, for multi-part models (e.g., zerofinlated or hurdles) and in combination with beside = TRUE this seems to be buggy.

Here is a reprex:

data("bioChemists", package = "pscl")
fm_zinb2 <- zeroinfl(art ~ . | ., data = bioChemists, dist = "negbin")
# debugonce(texreg:::extract.zeroinfl)
texreg::screenreg(fm_zinb2, beside = TRUE)
texreg::screenreg(list(fm_zinb2, fm_zinb2), beside = TRUE)
texreg::screenreg(list(m1 = fm_zinb2, m2 = fm_zinb2), beside = TRUE)  # buggy
texreg::screenreg(list(fm_zinb2, fm_zinb2), custom.model.names = c("m1 count", "m1 zero", "m2 count", "m2 zero"))  # complains about 4 names passed but only two models

So the bug is that the model names (here m1 and m2) overwrite Count model and Zero model of m1.

Just thought, I make you aware of it but this is not urgent at all.

Thanks for your work!

Best,
Daniel

@dheimgartner dheimgartner changed the title Model names when besides = TRUE Model names when besides = TRUE and multiple models are passed Oct 17, 2024
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