Coder Social home page Coder Social logo

Comments (15)

zen-juen avatar zen-juen commented on June 20, 2024 2

Hi there,
It seems like I'm encountering similar report() issues as were mentioned previously in this issue.

report_participants(df_final, sex="Gender")

#Error in UseMethod("format_value") : 
 no applicable method for 'format_value' applied to an object of class "NULL"

I've tried re-installing report() and with report(iris) but am still encountering the same problems, will appreciate any help I can get! :)

from report.

strengejacke avatar strengejacke commented on June 20, 2024 1

Sorry for the inconvenience, but this is simply due to the "project planning" and the order of package development (see, e.g., this presentation: https://github.com/easystats/easystats/blob/master/presentations/ludecke_2019_02_Hamburg_RUG/1902%20Hamburg%20RUG%20easystats.pdf).

We started by developing the low-level packages and then build up our easystats-suite by focussing on packages on the next level and so on. Thus, as some packages are still not fixed in their api and function design etc. is changing, the "higher level" packages like report, which are not yet on CRAN, will probably cause troubles every now and then.

For instance, some functions that used to be in the parameters package, were now re-implemented in the effectsize package. This had a strong impact on report (see #50).

Maybe we can have a more or less stable working version by the mid of this year, but I don't want to promise any deadline here.

from report.

strengejacke avatar strengejacke commented on June 20, 2024 1

oh, and ofcourse report() only:

lm(Sepal.Length ~ Petal.Length + Species, data=iris) %>%
  report()
#> We fitted a linear model (estimated using OLS) to predict Sepal.Length with Petal.Length and Species (formula = Sepal.Length ~ Petal.Length + Species). Standardized parameters were obtained by fitting the model on a standardized version of the dataset. Effect sizes were labelled following Funder's (2019) recommendations.
#> 
#> The model explains a significant and substantial proportion of variance (R2 = 0.84, F(3, 146) = 249.40, p < .001, adj. R2 = 0.83). The model's intercept, corresponding to Sepal.Length = 0, Petal.Length = 0 and Species = setosa, is at 3.68 (SE = 0.11, 95% CI [3.47, 3.89], p < .001). Within this model:
#> 
#>   - The effect of Petal.Length is positive and can be considered as very large and significant (beta = 1.93, SE = 0.14, 95% CI [1.66, 2.20], std. beta = 1.93, p < .001).
#>   - The effect of Speciesversicolor is negative and can be considered as very large and significant (beta = -1.93, SE = 0.23, 95% CI [-2.40, -1.47], std. beta = -1.93, p < .001).
#>   - The effect of Speciesvirginica is negative and can be considered as very large and significant (beta = -2.56, SE = 0.33, 95% CI [-3.21, -1.90], std. beta = -2.56, p < .001).

from report.

gorkang avatar gorkang commented on June 20, 2024

The same error appears when running the example shown in the README:

lm(Sepal.Length ~ Petal.Length + Species, data=iris) %>%
  report() %>%
  to_table() 

Error in UseMethod("format_value") :
no applicable method for 'format_value' applied to an object of class "NULL"

from report.

Paul-Yuchao-Dong avatar Paul-Yuchao-Dong commented on June 20, 2024

Same result here running the glm. I was prompted to install effectsize package first. But this problem persisted after restarting R and RStudio.

library(tidyverse)
library(report)

model <- glm(vs ~ mpg + cyl, data = mtcars, family = "binomial") 
report(model)
#> Waiting for profiling to be done...
#> Error in UseMethod("format_value"): no applicable method for 'format_value' applied to an object of class "NULL"

Created on 2020-01-17 by the reprex package (v0.3.0.9001)

from report.

sedufau avatar sedufau commented on June 20, 2024

Solved it by by installing parameters and loading it (https://github.com/easystats/parameters)
install.packages("parameters")
# easystats libraries
library(parameters)
library(report)

from report.

glennalthor avatar glennalthor commented on June 20, 2024

I'm also getting this error, installing parameters didn't help.

My code:

glm1 <- glm(any_vis ~ q2 + q3 + q4 + q5 + q6 + q7,
family="binomial",
data = dat)
summary(glm1)
report(glm1)

Error: Waiting for profiling to be done...
Error in UseMethod("format_value") :
no applicable method for 'format_value' applied to an object of class "NULL"

from report.

glennalthor avatar glennalthor commented on June 20, 2024

I was able to resolve this by installing the entire easystats suite.

from report.

Paul-Yuchao-Dong avatar Paul-Yuchao-Dong commented on June 20, 2024

I was able to resolve this by installing the entire easystats suite as well. the sequence I used was to install the suite then install report, and it worked.

from report.

Paul-Yuchao-Dong avatar Paul-Yuchao-Dong commented on June 20, 2024

@strengejacke thank you and your team for this great package. I personally like report the most because it interprets the r outputs into human language, compare and contrast that with the output of summary, it helped one learn stats rather quickly.

Though my programming ability is rather limited, I still like to try to help you to make report work better with the lower level package. Let me take a look at the issue list and contribution guidelines.

from report.

glennalthor avatar glennalthor commented on June 20, 2024

No need for apologies, you have done an amazing job with this wonderful series of packages!!! Report in particular is simply amazing.

from report.

DominiqueMakowski avatar DominiqueMakowski commented on June 20, 2024

the good news is that now the focus will shift back to report as all the other necessary "ingredients" are getting ready and stable πŸ‘¨β€πŸ³

Also, I should now finally have some time to fix the existing functionalities of this package in the next few days ☺️

stay tuned and thanks for your support and patience!

from report.

strengejacke avatar strengejacke commented on June 20, 2024

Should be fixed now (at current master branch), if you use table_long() or table_short().

library(report)
library(magrittr)
data(iris)

lm(Sepal.Length ~ Petal.Length + Species, data=iris) %>%
  report() %>%
  table_long() 
#> Parameter         | Coefficient |   SE | CI_low | CI_high |     t | df_error |    p | Std_Coefficient |    Fit
#> --------------------------------------------------------------------------------------------------------------
#> (Intercept)       |        1.50 | 0.19 |   1.12 |    1.87 |  7.93 |      146 | 0.00 |            1.50 |       
#> Petal.Length      |        1.93 | 0.14 |   1.66 |    2.20 | 13.96 |      146 | 0.00 |            1.93 |       
#> Speciesversicolor |       -1.93 | 0.23 |  -2.40 |   -1.47 | -8.28 |      146 | 0.00 |           -1.93 |       
#> Speciesvirginica  |       -2.56 | 0.33 |  -3.21 |   -1.90 | -7.74 |      146 | 0.00 |           -2.56 |       
#>                   |             |      |        |         |       |          |      |                 |       
#> AIC               |             |      |        |         |       |          |      |                 | 106.23
#> BIC               |             |      |        |         |       |          |      |                 | 121.29
#> R2                |             |      |        |         |       |          |      |                 |   0.84
#> R2 (adj.)         |             |      |        |         |       |          |      |                 |   0.83
#> RMSE              |             |      |        |         |       |          |      |                 |   0.33

lm(Sepal.Length ~ Petal.Length + Species, data=iris) %>%
  report() %>%
  table_short() 
#> Parameter         | Coefficient | CI_low | CI_high |    p | Std_Coefficient |  Fit
#> ----------------------------------------------------------------------------------
#> (Intercept)       |        1.50 |   1.12 |    1.87 | 0.00 |            1.50 |     
#> Petal.Length      |        1.93 |   1.66 |    2.20 | 0.00 |            1.93 |     
#> Speciesversicolor |       -1.93 |  -2.40 |   -1.47 | 0.00 |           -1.93 |     
#> Speciesvirginica  |       -2.56 |  -3.21 |   -1.90 | 0.00 |           -2.56 |     
#>                   |             |        |         |      |                 |     
#> R2                |             |        |         |      |                 | 0.84
#> R2 (adj.)         |             |        |         |      |                 | 0.83

Created on 2020-02-14 by the reprex package (v0.3.0)

from report.

sielerjm avatar sielerjm commented on June 20, 2024

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"

Update 1:

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

Screen Shot 2022-01-26 at 13 34 49

from report.

bwiernik avatar bwiernik commented on June 20, 2024

Please move further discussion to the new issue. This is a different problem

from report.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.