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" "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] "ordinal_weightit" "orm"
#> [181] "pgmm" "phyloglm"
#> [183] "phylolm" "plm"
#> [185] "poissonirr" "poissonmfx"
#> [187] "polr" "probitmfx"
#> [189] "psm" "ridgelm"
#> [191] "riskRegression" "rjags"
#> [193] "rlm" "rlmerMod"
#> [195] "rma" "rma.uni"
#> [197] "robmixglm" "robtab"
#> [199] "rq" "rqs"
#> [201] "rqss" "rvar"
#> [203] "scam" "selection"
#> [205] "sem" "semLm"
#> [207] "semLme" "seqanova.svyglm"
#> [209] "serp" "slm"
#> [211] "speedglm" "speedlm"
#> [213] "stanfit" "stanmvreg"
#> [215] "stanreg" "summary.lm"
#> [217] "survfit" "survreg"
#> [219] "svy2lme" "svy_vglm"
#> [221] "svychisq" "svyglm"
#> [223] "svyolr" "t1way"
#> [225] "tobit" "trimcibt"
#> [227] "truncreg" "vgam"
#> [229] "vglm" "wbgee"
#> [231] "wblm" "wbm"
#> [233] "wmcpAKP" "yuen"
#> [235] "yuend" "zcpglm"
#> [237] "zeroinfl" "zerotrunc"