Skip to contents

Small helper that checks if a model is a supported (regression) model object. supported_models() prints a list of currently supported model classes.

Usage

is_model_supported(x)

supported_models()

Arguments

x

An object.

Value

A logical, TRUE if x is a (supported) model object.

Details

This function returns TRUE if x is a model object that works with the package's functions. A list of supported models can also be found here: https://github.com/easystats/insight.

Examples


data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)

is_model_supported(m)
#> [1] TRUE
is_model_supported(mtcars)
#> [1] FALSE

# to see all supported models
supported_models()
#>   [1] "AKP"                     "Anova.mlm"              
#>   [3] "Arima"                   "BBmm"                   
#>   [5] "BBreg"                   "BFBayesFactor"          
#>   [7] "BGGM"                    "DirichletRegModel"      
#>   [9] "Gam"                     "Glm"                    
#>  [11] "HLfit"                   "LORgee"                 
#>  [13] "MANOVA"                  "MCMCglmm"               
#>  [15] "MixMod"                  "PMCMR"                  
#>  [17] "RM"                      "Rchoice"                
#>  [19] "Sarlm"                   "SemiParBIV"             
#>  [21] "aareg"                   "afex_aov"               
#>  [23] "anova.rms"               "aov"                    
#>  [25] "aovlist"                 "averaging"              
#>  [27] "bamlss"                  "bamlss.frame"           
#>  [29] "bayesQR"                 "bayesx"                 
#>  [31] "bcplm"                   "betamfx"                
#>  [33] "betaor"                  "betareg"                
#>  [35] "bfsl"                    "bife"                   
#>  [37] "bifeAPEs"                "bigglm"                 
#>  [39] "biglm"                   "blavaan"                
#>  [41] "blrm"                    "bracl"                  
#>  [43] "brglm"                   "brmsfit"                
#>  [45] "brmultinom"              "btergm"                 
#>  [47] "censReg"                 "cgam"                   
#>  [49] "cgamm"                   "cglm"                   
#>  [51] "clm"                     "clm2"                   
#>  [53] "clmm"                    "clmm2"                  
#>  [55] "clogit"                  "coeftest"               
#>  [57] "complmrob"               "confusionMatrix"        
#>  [59] "coxme"                   "coxph"                  
#>  [61] "coxph.penal"             "coxr"                   
#>  [63] "cpglm"                   "cpglmm"                 
#>  [65] "crch"                    "crq"                    
#>  [67] "crqs"                    "crr"                    
#>  [69] "dep.effect"              "draws"                  
#>  [71] "drc"                     "eglm"                   
#>  [73] "elm"                     "emmGrid"                
#>  [75] "epi.2by2"                "ergm"                   
#>  [77] "feglm"                   "feis"                   
#>  [79] "felm"                    "fitdistr"               
#>  [81] "fixest"                  "flac"                   
#>  [83] "flexsurvreg"             "flic"                   
#>  [85] "gam"                     "gamlss"                 
#>  [87] "gamm"                    "gamm4"                  
#>  [89] "garch"                   "gbm"                    
#>  [91] "gee"                     "geeglm"                 
#>  [93] "ggcomparisons"           "glht"                   
#>  [95] "glimML"                  "glm"                    
#>  [97] "glmRob"                  "glmerMod"               
#>  [99] "glmgee"                  "glmm"                   
#> [101] "glmmPQL"                 "glmmTMB"                
#> [103] "glmmadmb"                "glmrob"                 
#> [105] "glmx"                    "gls"                    
#> [107] "gmnl"                    "hglm"                   
#> [109] "htest"                   "hurdle"                 
#> [111] "ivFixed"                 "iv_robust"              
#> [113] "ivprobit"                "ivreg"                  
#> [115] "lavaan"                  "lm"                     
#> [117] "lmRob"                   "lm_robust"              
#> [119] "lme"                     "lmerMod"                
#> [121] "lmerModLmerTest"         "lmodel2"                
#> [123] "lmrob"                   "logistf"                
#> [125] "logitmfx"                "logitor"                
#> [127] "logitr"                  "lqm"                    
#> [129] "lqmm"                    "lrm"                    
#> [131] "manova"                  "marginaleffects"        
#> [133] "marginaleffects.summary" "margins"                
#> [135] "maxLik"                  "mblogit"                
#> [137] "mclogit"                 "mcmc"                   
#> [139] "mcmc.list"               "mcp1"                   
#> [141] "mcp12"                   "mcp2"                   
#> [143] "med1way"                 "mediate"                
#> [145] "merMod"                  "merModList"             
#> [147] "meta_bma"                "meta_fixed"             
#> [149] "meta_random"             "metaplus"               
#> [151] "mhurdle"                 "mipo"                   
#> [153] "mira"                    "mixed"                  
#> [155] "mixor"                   "mjoint"                 
#> [157] "mle"                     "mle2"                   
#> [159] "mlm"                     "mlogit"                 
#> [161] "mmclogit"                "mmlogit"                
#> [163] "mmrm"                    "mmrm_fit"               
#> [165] "mmrm_tmb"                "model_fit"              
#> [167] "multinom"                "mvord"                  
#> [169] "negbinirr"               "negbinmfx"              
#> [171] "nestedLogit"             "ols"                    
#> [173] "onesampb"                "orm"                    
#> [175] "pgmm"                    "phyloglm"               
#> [177] "phylolm"                 "plm"                    
#> [179] "poissonirr"              "poissonmfx"             
#> [181] "polr"                    "probitmfx"              
#> [183] "psm"                     "ridgelm"                
#> [185] "riskRegression"          "rjags"                  
#> [187] "rlm"                     "rlmerMod"               
#> [189] "rma"                     "rma.uni"                
#> [191] "robmixglm"               "robtab"                 
#> [193] "rq"                      "rqs"                    
#> [195] "rqss"                    "rvar"                   
#> [197] "scam"                    "selection"              
#> [199] "sem"                     "semLm"                  
#> [201] "semLme"                  "serp"                   
#> [203] "slm"                     "speedglm"               
#> [205] "speedlm"                 "stanfit"                
#> [207] "stanmvreg"               "stanreg"                
#> [209] "summary.lm"              "survfit"                
#> [211] "survreg"                 "svy2lme"                
#> [213] "svy_vglm"                "svychisq"               
#> [215] "svyglm"                  "svyolr"                 
#> [217] "t1way"                   "tobit"                  
#> [219] "trimcibt"                "truncreg"               
#> [221] "vgam"                    "vglm"                   
#> [223] "wbgee"                   "wblm"                   
#> [225] "wbm"                     "wmcpAKP"                
#> [227] "yuen"                    "yuend"                  
#> [229] "zcpglm"                  "zeroinfl"               
#> [231] "zerotrunc"