Checks if a regression model object is supported by the insight package
Source:R/is_model_supported.R
is_model_supported.Rd
Small helper that checks if a model is a supported
(regression) model object. supported_models()
prints a list
of currently supported model classes.
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" "coxph_weightit"
#> [63] "coxr" "cpglm"
#> [65] "cpglmm" "crch"
#> [67] "crq" "crqs"
#> [69] "crr" "dep.effect"
#> [71] "draws" "drc"
#> [73] "eglm" "elm"
#> [75] "emmGrid" "epi.2by2"
#> [77] "ergm" "feglm"
#> [79] "feis" "felm"
#> [81] "fitdistr" "fixest"
#> [83] "flac" "flexsurvreg"
#> [85] "flic" "gam"
#> [87] "gamlss" "gamm"
#> [89] "gamm4" "garch"
#> [91] "gbm" "gee"
#> [93] "geeglm" "ggcomparisons"
#> [95] "glht" "glimML"
#> [97] "glm" "glmRob"
#> [99] "glm_weightit" "glmerMod"
#> [101] "glmgee" "glmm"
#> [103] "glmmPQL" "glmmTMB"
#> [105] "glmmadmb" "glmrob"
#> [107] "glmx" "gls"
#> [109] "gmnl" "hglm"
#> [111] "htest" "hurdle"
#> [113] "ivFixed" "iv_robust"
#> [115] "ivprobit" "ivreg"
#> [117] "lavaan" "lm"
#> [119] "lmRob" "lm_robust"
#> [121] "lme" "lmerMod"
#> [123] "lmerModLmerTest" "lmodel2"
#> [125] "lmrob" "logistf"
#> [127] "logitmfx" "logitor"
#> [129] "logitr" "lqm"
#> [131] "lqmm" "lrm"
#> [133] "manova" "marginaleffects"
#> [135] "marginaleffects.summary" "margins"
#> [137] "maxLik" "mblogit"
#> [139] "mclogit" "mcmc"
#> [141] "mcmc.list" "mcp1"
#> [143] "mcp12" "mcp2"
#> [145] "med1way" "mediate"
#> [147] "merMod" "merModList"
#> [149] "meta_bma" "meta_fixed"
#> [151] "meta_random" "metaplus"
#> [153] "mhurdle" "mipo"
#> [155] "mira" "mixed"
#> [157] "mixor" "mjoint"
#> [159] "mle" "mle2"
#> [161] "mlm" "mlogit"
#> [163] "mmclogit" "mmlogit"
#> [165] "mmrm" "mmrm_fit"
#> [167] "mmrm_tmb" "model_fit"
#> [169] "multinom" "multinom_weightit"
#> [171] "mvord" "negbinirr"
#> [173] "negbinmfx" "nestedLogit"
#> [175] "ols" "onesampb"
#> [177] "ordinal_weightit" "orm"
#> [179] "pgmm" "phyloglm"
#> [181] "phylolm" "plm"
#> [183] "poissonirr" "poissonmfx"
#> [185] "polr" "probitmfx"
#> [187] "psm" "ridgelm"
#> [189] "riskRegression" "rjags"
#> [191] "rlm" "rlmerMod"
#> [193] "rma" "rma.uni"
#> [195] "robmixglm" "robtab"
#> [197] "rq" "rqs"
#> [199] "rqss" "rvar"
#> [201] "scam" "selection"
#> [203] "sem" "semLm"
#> [205] "semLme" "serp"
#> [207] "slm" "speedglm"
#> [209] "speedlm" "stanfit"
#> [211] "stanmvreg" "stanreg"
#> [213] "summary.lm" "survfit"
#> [215] "survreg" "svy2lme"
#> [217] "svy_vglm" "svychisq"
#> [219] "svyglm" "svyolr"
#> [221] "t1way" "tobit"
#> [223] "trimcibt" "truncreg"
#> [225] "vgam" "vglm"
#> [227] "wbgee" "wblm"
#> [229] "wbm" "wmcpAKP"
#> [231] "yuen" "yuend"
#> [233] "zcpglm" "zeroinfl"
#> [235] "zerotrunc"