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