easystats / insight

:crystal_ball: Easy access to model information for various model objects
https://easystats.github.io/insight/
GNU General Public License v3.0
395 stars 39 forks source link

Store statistic as named list attribute #135

Open strengejacke opened 5 years ago

strengejacke commented 5 years ago

or a named list as attribute, similar to how pretty_names are stored?

Originally posted by @DominiqueMakowski in https://github.com/easystats/parameters/issues/103#issuecomment-529967458

DominiqueMakowski commented 5 years ago

my idea was merely to generate the statistic column name of parameters using find_statistic, that we would have to tweak to eventually return a list in the case of different statistics type per parameters (as in gams), in which case it would be straightforward to display the correct name for each table component...

strengejacke commented 5 years ago

❔ ❓

DominiqueMakowski commented 5 years ago

😅 the issue I was trying to address is the following

😬

strengejacke commented 4 years ago

So, what you would like to have could be something like this, so we have the statistic's name for each value?

library(insight)
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
get_statistic(m)
#>     Parameter  Statistic  type
#> 1 (Intercept) 11.3994647     t
#> 2          wt -4.1204121     t
#> 3         cyl -2.2234114     t
#> 4          vs  0.3221477     t
strengejacke commented 3 years ago

Can we have some examples or write up those packages / model classes where this applies? @IndrajeetPatil any ideas?

IndrajeetPatil commented 3 years ago

Oh my god, you guys read my mind!

This is something I have also been thinking about and I would be happy to create a list of models where the statistic cataloguing is a bit more tricky.

IndrajeetPatil commented 3 years ago

I will keep updating the list as I keep exploring different models. Will let you know when I feel like I have covered most of the ground:

t / F-statistic:

z / Chi2-statistic:

IndrajeetPatil commented 2 years ago

I think we can go ahead with this and add the edge cases (with more than one type of statistic) as we encounter them.