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"              "drc"                    
#>  [71] "eglm"                    "elm"                    
#>  [73] "epi.2by2"                "ergm"                   
#>  [75] "feglm"                   "feis"                   
#>  [77] "felm"                    "fitdistr"               
#>  [79] "fixest"                  "flexsurvreg"            
#>  [81] "gam"                     "gamlss"                 
#>  [83] "gamm"                    "gamm4"                  
#>  [85] "garch"                   "gbm"                    
#>  [87] "gee"                     "geeglm"                 
#>  [89] "glht"                    "glimML"                 
#>  [91] "glm"                     "glmRob"                 
#>  [93] "glmm"                    "glmmPQL"                
#>  [95] "glmmTMB"                 "glmmadmb"               
#>  [97] "glmrob"                  "glmx"                   
#>  [99] "gls"                     "gmnl"                   
#> [101] "htest"                   "hurdle"                 
#> [103] "ivFixed"                 "iv_robust"              
#> [105] "ivprobit"                "ivreg"                  
#> [107] "lavaan"                  "lm"                     
#> [109] "lmRob"                   "lm_robust"              
#> [111] "lme"                     "lmerMod"                
#> [113] "lmerModLmerTest"         "lmodel2"                
#> [115] "lmrob"                   "logistf"                
#> [117] "logitmfx"                "logitor"                
#> [119] "lqm"                     "lqmm"                   
#> [121] "lrm"                     "manova"                 
#> [123] "marginaleffects"         "marginaleffects.summary"
#> [125] "margins"                 "maxLik"                 
#> [127] "mclogit"                 "mcmc"                   
#> [129] "mcmc.list"               "mcp1"                   
#> [131] "mcp12"                   "mcp2"                   
#> [133] "med1way"                 "mediate"                
#> [135] "merMod"                  "merModList"             
#> [137] "meta_bma"                "meta_fixed"             
#> [139] "meta_random"             "metaplus"               
#> [141] "mhurdle"                 "mipo"                   
#> [143] "mira"                    "mixed"                  
#> [145] "mixor"                   "mjoint"                 
#> [147] "mle"                     "mle2"                   
#> [149] "mlm"                     "mlogit"                 
#> [151] "mmlogit"                 "model_fit"              
#> [153] "multinom"                "mvord"                  
#> [155] "negbinirr"               "negbinmfx"              
#> [157] "ols"                     "onesampb"               
#> [159] "orm"                     "pgmm"                   
#> [161] "plm"                     "poissonirr"             
#> [163] "poissonmfx"              "polr"                   
#> [165] "probitmfx"               "psm"                    
#> [167] "ridgelm"                 "riskRegression"         
#> [169] "rjags"                   "rlm"                    
#> [171] "rlmerMod"                "rma"                    
#> [173] "rma.uni"                 "robmixglm"              
#> [175] "robtab"                  "rq"                     
#> [177] "rqs"                     "rqss"                   
#> [179] "scam"                    "selection"              
#> [181] "sem"                     "semLm"                  
#> [183] "semLme"                  "slm"                    
#> [185] "speedglm"                "speedlm"                
#> [187] "stanfit"                 "stanmvreg"              
#> [189] "stanreg"                 "summary.lm"             
#> [191] "survfit"                 "survreg"                
#> [193] "svy_vglm"                "svychisq"               
#> [195] "svyglm"                  "svyolr"                 
#> [197] "t1way"                   "tobit"                  
#> [199] "trimcibt"                "truncreg"               
#> [201] "vgam"                    "vglm"                   
#> [203] "wbgee"                   "wblm"                   
#> [205] "wbm"                     "wmcpAKP"                
#> [207] "yuen"                    "yuend"                  
#> [209] "zcpglm"                  "zeroinfl"               
#> [211] "zerotrunc"