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

Library not loading all listed functions #8

Open
IsadoraBM opened this issue Aug 7, 2021 · 5 comments
Open

Library not loading all listed functions #8

IsadoraBM opened this issue Aug 7, 2021 · 5 comments

Comments

@IsadoraBM
Copy link

This current version requires me to type bife:::predict.bife() to access it, most functions do not load if you rely on library(bife)
Bife issue

@dczarnowske
Copy link

Hello,

predict(object, ...) is a generic function that calls predict.bife(object, ...) if object is of class bife. Here an example:

library(bife)
df <- iris
df[["Long.Sepal"]] <- as.factor(ifelse(df[["Sepal.Length"]] > 5, "yes", "no"))
obj <- bife(Long.Sepal ~ Sepal.Width + Petal.Length + Petal.Width | Species, data = df, "logit")
predict(obj)

@IsadoraBM
Copy link
Author

IsadoraBM commented Aug 9, 2021 via email

@dczarnowske
Copy link

The other functions like coef, vcov, summary, ... are generics as well.

@IsadoraBM
Copy link
Author

but predict() does not state that it supports bife. Is this why there is an error in contrasts when predicting a model on a new dataset??

@dczarnowske
Copy link

Okay, but it would be a bit hard for the core developers to keep track of all the packages that extend predict, right?

That is why predict.bife is part of our package documentary. It tells the user that you can call predict on objects of class bife, e. g. the list returned by bife().

The error is unrelated.

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

2 participants