easystats / parameters

:bar_chart: Computation and processing of models' parameters
https://easystats.github.io/parameters/
GNU General Public License v3.0
436 stars 36 forks source link

feature request: supporting `rms::Glm` objects #313

Closed IndrajeetPatil closed 3 years ago

IndrajeetPatil commented 4 years ago
# setup
set.seed(123)
library(ggstatsplot)
library(rms)

## Dobson (1990) Page 93: Randomized Controlled Trial :
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
f <- Glm(counts ~ outcome + treatment, family=poisson())

class(f)
#> [1] "Glm" "rms" "glm" "lm"

f
#> General Linear Model
#>  
#>  Glm(formula = counts ~ outcome + treatment, family = poisson())
#>  
#>                    Model Likelihood     
#>                       Ratio Test        
#>  Obs       9       LR chi2      5.45    
#>  Residual d.f.4    d.f.            4    
#>  g 0.2271276       Pr(> chi2) 0.2440    
#>  
#>              Coef    S.E.   Wald Z Pr(>|Z|)
#>  Intercept    3.0445 0.1709 17.81  <0.0001 
#>  outcome=2   -0.4543 0.2022 -2.25  0.0246  
#>  outcome=3   -0.2930 0.1927 -1.52  0.1285  
#>  treatment=2  0.0000 0.2000  0.00  1.0000  
#>  treatment=3  0.0000 0.2000  0.00  1.0000  
#> 

parameters::model_parameters(f)
#> Error in if (insight::n_obs(model) > 10000 && df_method == "profile") {: missing value where TRUE/FALSE needed

Created on 2020-10-09 by the reprex package (v0.3.0)

strengejacke commented 3 years ago

closed in https://github.com/easystats/insight/commit/645b89a05e1a51132f993196c135e7d8ff13a48b