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