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

report_table() for family = "quasibinomial" #220

Open
bwiernik opened this issue Jan 26, 2022 · 4 comments
Open

report_table() for family = "quasibinomial" #220

bwiernik opened this issue Jan 26, 2022 · 4 comments

Comments

@bwiernik
Copy link
Contributor

I'm also encountering a similar problem. I installed easystats collection after installing report individually. I tried reinstalling report separately, but no luck so far.

The issue appears to be situational. I can run a simple linear model with no problems using report(), but with a glm I get the error (see below). The response variable data is between 0 and 1 (eg. 0.00, 0.102, ... .899, 1.00), and the explanatory variables are categorical. Running a similar linear model, but with a different response variables works fine. I suspect it's something with the GLM() and the response variable data type. I'll continue testing to see if I figure out the root of the issue.

glm( formula = "Alpha.Score ~ Diet",
                      data = subset(dt.alphaPlus.T0.melt, Alpha.Metric == "Observed"),
                      family = "quasibinomial") %>% report::report()
Error in UseMethod("format_value") : 
no applicable method for 'format_value' applied to an object of class "NULL"

Originally posted by @sielerjm in #56 (comment)

@bwiernik
Copy link
Contributor Author

Issue is this line in report_table.glm:

if (insight::model_info(x)$is_logit) {
    params <- data_remove(params, "df_error")
  }

family = "quasibinomial" are logit, but also have a t (not z) distribution.

It should be

mi <- insight::model_info(x)
if (mi$is_logit && mi$family != "quasibinomial") {
    params <- data_remove(params, "df_error")
  }

or

mi <- insight::model_info(x)
if (mi$is_binomial && mi$family != "quasibinomial") {
    params <- data_remove(params, "df_error")
  }

@sielerjm
Copy link

Based on @bwiernik comment, I reran the tests and it appears the issue is with "quasibinomial" family (see image).

Screen Shot 2022-01-26 at 13 34 49

@John-Mola
Copy link

Anyone ever come up with a solution to this?

@sielerjm
Copy link

Anyone ever come up with a solution to this?

Still no resolution, afaik.

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

3 participants