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] "lavaan"                  "lm"                     
#> [121] "lmRob"                   "lm_robust"              
#> [123] "lme"                     "lmerMod"                
#> [125] "lmerModLmerTest"         "lmodel2"                
#> [127] "lmrob"                   "logistf"                
#> [129] "logitmfx"                "logitor"                
#> [131] "logitr"                  "lqm"                    
#> [133] "lqmm"                    "lrm"                    
#> [135] "manova"                  "marginaleffects"        
#> [137] "marginaleffects.summary" "margins"                
#> [139] "maxLik"                  "mblogit"                
#> [141] "mclogit"                 "mcmc"                   
#> [143] "mcmc.list"               "mcp1"                   
#> [145] "mcp12"                   "mcp2"                   
#> [147] "med1way"                 "mediate"                
#> [149] "merMod"                  "merModList"             
#> [151] "meta_bma"                "meta_fixed"             
#> [153] "meta_random"             "metaplus"               
#> [155] "mhurdle"                 "mipo"                   
#> [157] "mira"                    "mixed"                  
#> [159] "mixor"                   "mjoint"                 
#> [161] "mle"                     "mle2"                   
#> [163] "mlm"                     "mlogit"                 
#> [165] "mmclogit"                "mmlogit"                
#> [167] "mmrm"                    "mmrm_fit"               
#> [169] "mmrm_tmb"                "model_fit"              
#> [171] "multinom"                "multinom_weightit"      
#> [173] "mvord"                   "negbinirr"              
#> [175] "negbinmfx"               "nestedLogit"            
#> [177] "ols"                     "onesampb"               
#> [179] "oohbchoice"              "ordinal_weightit"       
#> [181] "orm"                     "pgmm"                   
#> [183] "phyloglm"                "phylolm"                
#> [185] "plm"                     "poissonirr"             
#> [187] "poissonmfx"              "polr"                   
#> [189] "probitmfx"               "psm"                    
#> [191] "ridgelm"                 "riskRegression"         
#> [193] "rjags"                   "rlm"                    
#> [195] "rlmerMod"                "rma"                    
#> [197] "rma.uni"                 "robmixglm"              
#> [199] "robtab"                  "rq"                     
#> [201] "rqs"                     "rqss"                   
#> [203] "rvar"                    "scam"                   
#> [205] "selection"               "sem"                    
#> [207] "semLm"                   "semLme"                 
#> [209] "seqanova.svyglm"         "serp"                   
#> [211] "slm"                     "speedglm"               
#> [213] "speedlm"                 "stanfit"                
#> [215] "stanmvreg"               "stanreg"                
#> [217] "summary.lm"              "survfit"                
#> [219] "survreg"                 "svy2lme"                
#> [221] "svy_vglm"                "svychisq"               
#> [223] "svyglm"                  "svyolr"                 
#> [225] "t1way"                   "tobit"                  
#> [227] "trimcibt"                "truncreg"               
#> [229] "vgam"                    "vglm"                   
#> [231] "wbgee"                   "wblm"                   
#> [233] "wbm"                     "wmcpAKP"                
#> [235] "yuen"                    "yuend"                  
#> [237] "zcpglm"                  "zeroinfl"               
#> [239] "zerotrunc"