insight/ 0000755 0001762 0000144 00000000000 13615601156 011723 5 ustar ligges users insight/NAMESPACE 0000644 0001762 0000144 00000054565 13615562325 013165 0 ustar ligges users # Generated by roxygen2: do not edit by hand
S3method(clean_names,character)
S3method(clean_names,default)
S3method(clean_parameters,BFBayesFactor)
S3method(clean_parameters,blavaan)
S3method(clean_parameters,brmsfit)
S3method(clean_parameters,default)
S3method(clean_parameters,lavaan)
S3method(clean_parameters,stanmvreg)
S3method(clean_parameters,stanreg)
S3method(clean_parameters,wbgee)
S3method(clean_parameters,wbm)
S3method(find_algorithm,BBmm)
S3method(find_algorithm,BBreg)
S3method(find_algorithm,Gam)
S3method(find_algorithm,LORgee)
S3method(find_algorithm,MixMod)
S3method(find_algorithm,bayesx)
S3method(find_algorithm,bigglm)
S3method(find_algorithm,biglm)
S3method(find_algorithm,blavaan)
S3method(find_algorithm,brmsfit)
S3method(find_algorithm,crq)
S3method(find_algorithm,default)
S3method(find_algorithm,gam)
S3method(find_algorithm,gamlss)
S3method(find_algorithm,glimML)
S3method(find_algorithm,glm)
S3method(find_algorithm,glmmTMB)
S3method(find_algorithm,glmrob)
S3method(find_algorithm,lm)
S3method(find_algorithm,lmRob)
S3method(find_algorithm,lme)
S3method(find_algorithm,lmrob)
S3method(find_algorithm,logistf)
S3method(find_algorithm,merMod)
S3method(find_algorithm,mixed)
S3method(find_algorithm,rlmerMod)
S3method(find_algorithm,rq)
S3method(find_algorithm,rqss)
S3method(find_algorithm,speedglm)
S3method(find_algorithm,speedlm)
S3method(find_algorithm,stanreg)
S3method(find_formula,BBmm)
S3method(find_formula,BFBayesFactor)
S3method(find_formula,DirichletRegModel)
S3method(find_formula,LORgee)
S3method(find_formula,MANOVA)
S3method(find_formula,MCMCglmm)
S3method(find_formula,MixMod)
S3method(find_formula,RM)
S3method(find_formula,aovlist)
S3method(find_formula,bamlss)
S3method(find_formula,brmsfit)
S3method(find_formula,cgamm)
S3method(find_formula,cglm)
S3method(find_formula,clm2)
S3method(find_formula,clmm)
S3method(find_formula,clmm2)
S3method(find_formula,coxme)
S3method(find_formula,cpglmm)
S3method(find_formula,data.frame)
S3method(find_formula,default)
S3method(find_formula,feglm)
S3method(find_formula,feis)
S3method(find_formula,felm)
S3method(find_formula,fixest)
S3method(find_formula,gam)
S3method(find_formula,gamlss)
S3method(find_formula,gamm)
S3method(find_formula,gee)
S3method(find_formula,glimML)
S3method(find_formula,glmmTMB)
S3method(find_formula,glmmadmb)
S3method(find_formula,gls)
S3method(find_formula,hurdle)
S3method(find_formula,iv_robust)
S3method(find_formula,ivreg)
S3method(find_formula,lme)
S3method(find_formula,merMod)
S3method(find_formula,mixed)
S3method(find_formula,mixor)
S3method(find_formula,mmclogit)
S3method(find_formula,nlmerMod)
S3method(find_formula,plm)
S3method(find_formula,rlmerMod)
S3method(find_formula,stanmvreg)
S3method(find_formula,stanreg)
S3method(find_formula,tobit)
S3method(find_formula,wbgee)
S3method(find_formula,wbm)
S3method(find_formula,zeroinfl)
S3method(find_formula,zerotrunc)
S3method(find_parameters,BBmm)
S3method(find_parameters,BBreg)
S3method(find_parameters,BFBayesFactor)
S3method(find_parameters,DirichletRegModel)
S3method(find_parameters,Gam)
S3method(find_parameters,MCMCglmm)
S3method(find_parameters,MixMod)
S3method(find_parameters,aareg)
S3method(find_parameters,aovlist)
S3method(find_parameters,bayesx)
S3method(find_parameters,betareg)
S3method(find_parameters,blavaan)
S3method(find_parameters,bracl)
S3method(find_parameters,brmsfit)
S3method(find_parameters,brmultinom)
S3method(find_parameters,cgam)
S3method(find_parameters,clm2)
S3method(find_parameters,clmm2)
S3method(find_parameters,coxme)
S3method(find_parameters,cpglmm)
S3method(find_parameters,crq)
S3method(find_parameters,crqs)
S3method(find_parameters,data.frame)
S3method(find_parameters,default)
S3method(find_parameters,flexsurvreg)
S3method(find_parameters,gam)
S3method(find_parameters,gamlss)
S3method(find_parameters,gamm)
S3method(find_parameters,gbm)
S3method(find_parameters,glimML)
S3method(find_parameters,glmmTMB)
S3method(find_parameters,glmmadmb)
S3method(find_parameters,glmx)
S3method(find_parameters,hurdle)
S3method(find_parameters,lavaan)
S3method(find_parameters,lme)
S3method(find_parameters,lrm)
S3method(find_parameters,mcmc)
S3method(find_parameters,merMod)
S3method(find_parameters,mixed)
S3method(find_parameters,mixor)
S3method(find_parameters,mlm)
S3method(find_parameters,multinom)
S3method(find_parameters,nlmerMod)
S3method(find_parameters,polr)
S3method(find_parameters,rlmerMod)
S3method(find_parameters,rma)
S3method(find_parameters,rqss)
S3method(find_parameters,sim)
S3method(find_parameters,sim.merMod)
S3method(find_parameters,stanmvreg)
S3method(find_parameters,stanreg)
S3method(find_parameters,vgam)
S3method(find_parameters,wbgee)
S3method(find_parameters,wbm)
S3method(find_parameters,zeroinfl)
S3method(find_parameters,zerotrunc)
S3method(find_weights,brmsfit)
S3method(find_weights,default)
S3method(format_value,character)
S3method(format_value,data.frame)
S3method(format_value,double)
S3method(format_value,factor)
S3method(format_value,logical)
S3method(format_value,numeric)
S3method(get_data,BBmm)
S3method(get_data,BFBayesFactor)
S3method(get_data,DirichletRegModel)
S3method(get_data,LORgee)
S3method(get_data,MANOVA)
S3method(get_data,MCMCglmm)
S3method(get_data,MixMod)
S3method(get_data,RM)
S3method(get_data,aareg)
S3method(get_data,bigglm)
S3method(get_data,biglm)
S3method(get_data,blavaan)
S3method(get_data,bracl)
S3method(get_data,brmsfit)
S3method(get_data,clm2)
S3method(get_data,clmm)
S3method(get_data,clmm2)
S3method(get_data,complmrob)
S3method(get_data,cpglmm)
S3method(get_data,data.frame)
S3method(get_data,default)
S3method(get_data,feglm)
S3method(get_data,feis)
S3method(get_data,felm)
S3method(get_data,fixest)
S3method(get_data,gamlss)
S3method(get_data,gamm)
S3method(get_data,gbm)
S3method(get_data,gee)
S3method(get_data,glimML)
S3method(get_data,glmmTMB)
S3method(get_data,glmmadmb)
S3method(get_data,gls)
S3method(get_data,gmnl)
S3method(get_data,hurdle)
S3method(get_data,iv_robust)
S3method(get_data,ivreg)
S3method(get_data,lavaan)
S3method(get_data,lme)
S3method(get_data,merMod)
S3method(get_data,mixed)
S3method(get_data,mixor)
S3method(get_data,nlrq)
S3method(get_data,plm)
S3method(get_data,rlmerMod)
S3method(get_data,rma)
S3method(get_data,rqss)
S3method(get_data,stanmvreg)
S3method(get_data,stanreg)
S3method(get_data,survfit)
S3method(get_data,tobit)
S3method(get_data,vgam)
S3method(get_data,vglm)
S3method(get_data,wbgee)
S3method(get_data,wbm)
S3method(get_data,zeroinfl)
S3method(get_data,zerotrunc)
S3method(get_parameters,BBmm)
S3method(get_parameters,BBreg)
S3method(get_parameters,BFBayesFactor)
S3method(get_parameters,DirichletRegModel)
S3method(get_parameters,Gam)
S3method(get_parameters,MCMCglmm)
S3method(get_parameters,MixMod)
S3method(get_parameters,aareg)
S3method(get_parameters,aov)
S3method(get_parameters,aovlist)
S3method(get_parameters,bayesx)
S3method(get_parameters,betareg)
S3method(get_parameters,blavaan)
S3method(get_parameters,bracl)
S3method(get_parameters,brmsfit)
S3method(get_parameters,brmultinom)
S3method(get_parameters,cgam)
S3method(get_parameters,clm2)
S3method(get_parameters,clmm2)
S3method(get_parameters,coxme)
S3method(get_parameters,cpglmm)
S3method(get_parameters,crq)
S3method(get_parameters,crqs)
S3method(get_parameters,data.frame)
S3method(get_parameters,default)
S3method(get_parameters,flexsurvreg)
S3method(get_parameters,gam)
S3method(get_parameters,gamlss)
S3method(get_parameters,gamm)
S3method(get_parameters,gbm)
S3method(get_parameters,glimML)
S3method(get_parameters,glmmTMB)
S3method(get_parameters,glmmadmb)
S3method(get_parameters,glmx)
S3method(get_parameters,hurdle)
S3method(get_parameters,lavaan)
S3method(get_parameters,lme)
S3method(get_parameters,lrm)
S3method(get_parameters,mcmc)
S3method(get_parameters,merMod)
S3method(get_parameters,mixed)
S3method(get_parameters,mixor)
S3method(get_parameters,mlm)
S3method(get_parameters,multinom)
S3method(get_parameters,nlmerMod)
S3method(get_parameters,polr)
S3method(get_parameters,rlmerMod)
S3method(get_parameters,rma)
S3method(get_parameters,rqss)
S3method(get_parameters,sim)
S3method(get_parameters,sim.merMod)
S3method(get_parameters,stanmvreg)
S3method(get_parameters,stanreg)
S3method(get_parameters,vgam)
S3method(get_parameters,wbgee)
S3method(get_parameters,wbm)
S3method(get_parameters,zeroinfl)
S3method(get_parameters,zerotrunc)
S3method(get_priors,BFBayesFactor)
S3method(get_priors,blavaan)
S3method(get_priors,brmsfit)
S3method(get_priors,stanmvreg)
S3method(get_priors,stanreg)
S3method(get_statistic,DirichletRegModel)
S3method(get_statistic,Gam)
S3method(get_statistic,LORgee)
S3method(get_statistic,MANOVA)
S3method(get_statistic,MixMod)
S3method(get_statistic,RM)
S3method(get_statistic,aareg)
S3method(get_statistic,betareg)
S3method(get_statistic,bigglm)
S3method(get_statistic,biglm)
S3method(get_statistic,bracl)
S3method(get_statistic,brmultinom)
S3method(get_statistic,censReg)
S3method(get_statistic,cgam)
S3method(get_statistic,clm2)
S3method(get_statistic,clmm2)
S3method(get_statistic,complmrob)
S3method(get_statistic,coxme)
S3method(get_statistic,coxph)
S3method(get_statistic,cpglm)
S3method(get_statistic,cpglmm)
S3method(get_statistic,crch)
S3method(get_statistic,crq)
S3method(get_statistic,default)
S3method(get_statistic,feis)
S3method(get_statistic,fixest)
S3method(get_statistic,flexsurvreg)
S3method(get_statistic,gam)
S3method(get_statistic,gamlss)
S3method(get_statistic,gamm)
S3method(get_statistic,gee)
S3method(get_statistic,geeglm)
S3method(get_statistic,glimML)
S3method(get_statistic,glmmTMB)
S3method(get_statistic,glmmadmb)
S3method(get_statistic,glmx)
S3method(get_statistic,hurdle)
S3method(get_statistic,list)
S3method(get_statistic,lm_robust)
S3method(get_statistic,lme)
S3method(get_statistic,logistf)
S3method(get_statistic,lrm)
S3method(get_statistic,maxLik)
S3method(get_statistic,mixor)
S3method(get_statistic,mlm)
S3method(get_statistic,multinom)
S3method(get_statistic,negbin)
S3method(get_statistic,nlrq)
S3method(get_statistic,ols)
S3method(get_statistic,plm)
S3method(get_statistic,psm)
S3method(get_statistic,rma)
S3method(get_statistic,rms)
S3method(get_statistic,rq)
S3method(get_statistic,rqss)
S3method(get_statistic,survreg)
S3method(get_statistic,svyglm.nb)
S3method(get_statistic,svyglm.zip)
S3method(get_statistic,tobit)
S3method(get_statistic,truncreg)
S3method(get_statistic,vgam)
S3method(get_statistic,vglm)
S3method(get_statistic,wbgee)
S3method(get_statistic,wbm)
S3method(get_statistic,zerocount)
S3method(get_statistic,zeroinfl)
S3method(get_varcov,BBmm)
S3method(get_varcov,BBreg)
S3method(get_varcov,DirichletRegModel)
S3method(get_varcov,LORgee)
S3method(get_varcov,MixMod)
S3method(get_varcov,betareg)
S3method(get_varcov,brmsfit)
S3method(get_varcov,cglm)
S3method(get_varcov,clm2)
S3method(get_varcov,clmm2)
S3method(get_varcov,cpglm)
S3method(get_varcov,cpglmm)
S3method(get_varcov,crq)
S3method(get_varcov,default)
S3method(get_varcov,feis)
S3method(get_varcov,flexsurvreg)
S3method(get_varcov,gamlss)
S3method(get_varcov,gamm)
S3method(get_varcov,gee)
S3method(get_varcov,geeglm)
S3method(get_varcov,glimML)
S3method(get_varcov,glmRob)
S3method(get_varcov,glmmTMB)
S3method(get_varcov,glmx)
S3method(get_varcov,hurdle)
S3method(get_varcov,list)
S3method(get_varcov,lmRob)
S3method(get_varcov,maxLik)
S3method(get_varcov,mixed)
S3method(get_varcov,mixor)
S3method(get_varcov,nlrq)
S3method(get_varcov,rq)
S3method(get_varcov,tobit)
S3method(get_varcov,truncreg)
S3method(get_varcov,vgam)
S3method(get_varcov,vglm)
S3method(get_varcov,zerocount)
S3method(get_varcov,zeroinfl)
S3method(get_variance,MixMod)
S3method(get_variance,clmm)
S3method(get_variance,cpglmm)
S3method(get_variance,default)
S3method(get_variance,glmmTMB)
S3method(get_variance,glmmadmb)
S3method(get_variance,lme)
S3method(get_variance,merMod)
S3method(get_variance,mixed)
S3method(get_variance,rlmerMod)
S3method(get_variance,stanreg)
S3method(get_variance,wblm)
S3method(get_variance,wbm)
S3method(get_weights,brmsfit)
S3method(get_weights,default)
S3method(link_function,BBmm)
S3method(link_function,BBreg)
S3method(link_function,DirichletRegModel)
S3method(link_function,LORgee)
S3method(link_function,MANOVA)
S3method(link_function,RM)
S3method(link_function,aovlist)
S3method(link_function,bamlss)
S3method(link_function,bayesx)
S3method(link_function,betareg)
S3method(link_function,bigglm)
S3method(link_function,biglm)
S3method(link_function,brglm)
S3method(link_function,brmsfit)
S3method(link_function,censReg)
S3method(link_function,cgam)
S3method(link_function,cglm)
S3method(link_function,clm)
S3method(link_function,clm2)
S3method(link_function,clmm)
S3method(link_function,complmRob)
S3method(link_function,coxme)
S3method(link_function,coxph)
S3method(link_function,cpglm)
S3method(link_function,cpglmm)
S3method(link_function,crch)
S3method(link_function,crq)
S3method(link_function,crqs)
S3method(link_function,default)
S3method(link_function,feglm)
S3method(link_function,feis)
S3method(link_function,felm)
S3method(link_function,fixest)
S3method(link_function,flexsurvreg)
S3method(link_function,gam)
S3method(link_function,gamlss)
S3method(link_function,gamm)
S3method(link_function,gbm)
S3method(link_function,glimML)
S3method(link_function,glm)
S3method(link_function,glmmadmb)
S3method(link_function,glmx)
S3method(link_function,gls)
S3method(link_function,gmnl)
S3method(link_function,hurdle)
S3method(link_function,iv_robust)
S3method(link_function,ivreg)
S3method(link_function,lm)
S3method(link_function,lmRob)
S3method(link_function,lm_robust)
S3method(link_function,lme)
S3method(link_function,lmrob)
S3method(link_function,logistf)
S3method(link_function,lrm)
S3method(link_function,mixed)
S3method(link_function,mixor)
S3method(link_function,mlogit)
S3method(link_function,multinom)
S3method(link_function,plm)
S3method(link_function,polr)
S3method(link_function,psm)
S3method(link_function,rq)
S3method(link_function,rqss)
S3method(link_function,speedglm)
S3method(link_function,speedlm)
S3method(link_function,stanmvreg)
S3method(link_function,survfit)
S3method(link_function,survreg)
S3method(link_function,svyolr)
S3method(link_function,tobit)
S3method(link_function,truncreg)
S3method(link_function,vgam)
S3method(link_function,vglm)
S3method(link_function,zeroinfl)
S3method(link_function,zerotrunc)
S3method(link_inverse,BBmm)
S3method(link_inverse,BBreg)
S3method(link_inverse,DirichletRegModel)
S3method(link_inverse,LORgee)
S3method(link_inverse,MANOVA)
S3method(link_inverse,MCMCglmm)
S3method(link_inverse,MixMod)
S3method(link_inverse,RM)
S3method(link_inverse,aovlist)
S3method(link_inverse,bamlss)
S3method(link_inverse,bayesx)
S3method(link_inverse,betareg)
S3method(link_inverse,bigglm)
S3method(link_inverse,biglm)
S3method(link_inverse,brmsfit)
S3method(link_inverse,censReg)
S3method(link_inverse,cgam)
S3method(link_inverse,clm)
S3method(link_inverse,clm2)
S3method(link_inverse,clmm)
S3method(link_inverse,complmrob)
S3method(link_inverse,coxme)
S3method(link_inverse,coxph)
S3method(link_inverse,cpglm)
S3method(link_inverse,cpglmm)
S3method(link_inverse,crch)
S3method(link_inverse,crq)
S3method(link_inverse,crqs)
S3method(link_inverse,default)
S3method(link_inverse,feglm)
S3method(link_inverse,feis)
S3method(link_inverse,felm)
S3method(link_inverse,fixest)
S3method(link_inverse,flexsurvreg)
S3method(link_inverse,gam)
S3method(link_inverse,gamlss)
S3method(link_inverse,gamm)
S3method(link_inverse,gbm)
S3method(link_inverse,glimML)
S3method(link_inverse,glm)
S3method(link_inverse,glmmPQL)
S3method(link_inverse,glmmTMB)
S3method(link_inverse,glmmadmb)
S3method(link_inverse,glmx)
S3method(link_inverse,gls)
S3method(link_inverse,gmnl)
S3method(link_inverse,hurdle)
S3method(link_inverse,iv_robust)
S3method(link_inverse,ivreg)
S3method(link_inverse,lm)
S3method(link_inverse,lmRob)
S3method(link_inverse,lm_robust)
S3method(link_inverse,lme)
S3method(link_inverse,lmrob)
S3method(link_inverse,logistf)
S3method(link_inverse,lrm)
S3method(link_inverse,mixed)
S3method(link_inverse,mixor)
S3method(link_inverse,mlogit)
S3method(link_inverse,multinom)
S3method(link_inverse,plm)
S3method(link_inverse,polr)
S3method(link_inverse,psm)
S3method(link_inverse,rq)
S3method(link_inverse,rqss)
S3method(link_inverse,speedglm)
S3method(link_inverse,speedlm)
S3method(link_inverse,stanmvreg)
S3method(link_inverse,survfit)
S3method(link_inverse,survreg)
S3method(link_inverse,svyolr)
S3method(link_inverse,tobit)
S3method(link_inverse,truncreg)
S3method(link_inverse,vgam)
S3method(link_inverse,vglm)
S3method(link_inverse,zeroinfl)
S3method(link_inverse,zerotrunc)
S3method(model_info,BBmm)
S3method(model_info,BBreg)
S3method(model_info,BFBayesFactor)
S3method(model_info,DirichletRegModel)
S3method(model_info,LORgee)
S3method(model_info,MANOVA)
S3method(model_info,MCMCglmm)
S3method(model_info,MixMod)
S3method(model_info,RM)
S3method(model_info,aareg)
S3method(model_info,aovlist)
S3method(model_info,bamlss)
S3method(model_info,bayesx)
S3method(model_info,betareg)
S3method(model_info,brmsfit)
S3method(model_info,brmultinom)
S3method(model_info,censReg)
S3method(model_info,cgam)
S3method(model_info,cglm)
S3method(model_info,clm)
S3method(model_info,clm2)
S3method(model_info,clmm)
S3method(model_info,complmrob)
S3method(model_info,coxme)
S3method(model_info,coxph)
S3method(model_info,cpglm)
S3method(model_info,cpglmm)
S3method(model_info,crch)
S3method(model_info,crq)
S3method(model_info,crqs)
S3method(model_info,data.frame)
S3method(model_info,default)
S3method(model_info,feglm)
S3method(model_info,feis)
S3method(model_info,felm)
S3method(model_info,fixest)
S3method(model_info,flexsurvreg)
S3method(model_info,gam)
S3method(model_info,gamlss)
S3method(model_info,gamm)
S3method(model_info,gbm)
S3method(model_info,glimML)
S3method(model_info,glmmPQL)
S3method(model_info,glmmTMB)
S3method(model_info,glmmadmb)
S3method(model_info,glmx)
S3method(model_info,gls)
S3method(model_info,gmnl)
S3method(model_info,htest)
S3method(model_info,hurdle)
S3method(model_info,iv_robust)
S3method(model_info,ivreg)
S3method(model_info,lmRob)
S3method(model_info,lm_robust)
S3method(model_info,lme)
S3method(model_info,lmrob)
S3method(model_info,logistf)
S3method(model_info,lrm)
S3method(model_info,maxLik)
S3method(model_info,mcmc)
S3method(model_info,mixed)
S3method(model_info,mixor)
S3method(model_info,mlm)
S3method(model_info,mlogit)
S3method(model_info,mmclogit)
S3method(model_info,multinom)
S3method(model_info,nlrq)
S3method(model_info,nls)
S3method(model_info,plm)
S3method(model_info,polr)
S3method(model_info,rma)
S3method(model_info,rq)
S3method(model_info,rqss)
S3method(model_info,speedglm)
S3method(model_info,speedlm)
S3method(model_info,stanmvreg)
S3method(model_info,survfit)
S3method(model_info,survreg)
S3method(model_info,svyolr)
S3method(model_info,tobit)
S3method(model_info,truncreg)
S3method(model_info,vgam)
S3method(model_info,vglm)
S3method(model_info,zeroinfl)
S3method(model_info,zerotrunc)
S3method(n_obs,BBmm)
S3method(n_obs,BBreg)
S3method(n_obs,LORgee)
S3method(n_obs,MANOVA)
S3method(n_obs,RM)
S3method(n_obs,aareg)
S3method(n_obs,aovlist)
S3method(n_obs,bamlss)
S3method(n_obs,bayesx)
S3method(n_obs,bigglm)
S3method(n_obs,biglm)
S3method(n_obs,censReg)
S3method(n_obs,cgam)
S3method(n_obs,cglm)
S3method(n_obs,complmrob)
S3method(n_obs,coxme)
S3method(n_obs,coxph)
S3method(n_obs,cpglm)
S3method(n_obs,cpglmm)
S3method(n_obs,crq)
S3method(n_obs,crqs)
S3method(n_obs,default)
S3method(n_obs,feglm)
S3method(n_obs,feis)
S3method(n_obs,felm)
S3method(n_obs,fixest)
S3method(n_obs,flexsurvreg)
S3method(n_obs,gamm)
S3method(n_obs,gbm)
S3method(n_obs,glimML)
S3method(n_obs,glmRob)
S3method(n_obs,gmnl)
S3method(n_obs,hurdle)
S3method(n_obs,lmRob)
S3method(n_obs,maxLik)
S3method(n_obs,mcmc)
S3method(n_obs,mlogit)
S3method(n_obs,multinom)
S3method(n_obs,nlrq)
S3method(n_obs,rq)
S3method(n_obs,rqss)
S3method(n_obs,stanmvreg)
S3method(n_obs,survfit)
S3method(n_obs,survreg)
S3method(n_obs,svyolr)
S3method(n_obs,wbgee)
S3method(n_obs,wbm)
S3method(n_obs,zeroinfl)
S3method(n_obs,zerotrunc)
S3method(print,easystats_check)
export(all_models_equal)
export(all_models_same_class)
export(clean_names)
export(clean_parameters)
export(color_if)
export(colour_if)
export(download_model)
export(find_algorithm)
export(find_formula)
export(find_interactions)
export(find_parameters)
export(find_predictors)
export(find_random)
export(find_random_slopes)
export(find_response)
export(find_statistic)
export(find_terms)
export(find_variables)
export(find_weights)
export(format_ci)
export(format_table)
export(format_value)
export(get_correlation_slope_intercept)
export(get_data)
export(get_parameters)
export(get_predictors)
export(get_priors)
export(get_random)
export(get_response)
export(get_statistic)
export(get_varcov)
export(get_variance)
export(get_variance_dispersion)
export(get_variance_distribution)
export(get_variance_fixed)
export(get_variance_intercept)
export(get_variance_random)
export(get_variance_residual)
export(get_variance_slope)
export(get_weights)
export(has_intercept)
export(is_model)
export(is_model_supported)
export(is_multivariate)
export(is_nullmodel)
export(link_function)
export(link_inverse)
export(model_info)
export(n_obs)
export(print_color)
export(print_colour)
export(print_parameters)
export(supported_models)
importFrom(methods,.hasSlot)
importFrom(methods,slot)
importFrom(methods,slotNames)
importFrom(stats,Gamma)
importFrom(stats,as.formula)
importFrom(stats,binomial)
importFrom(stats,coef)
importFrom(stats,drop.terms)
importFrom(stats,family)
importFrom(stats,fitted)
importFrom(stats,formula)
importFrom(stats,gaussian)
importFrom(stats,getCall)
importFrom(stats,make.link)
importFrom(stats,model.frame)
importFrom(stats,model.matrix)
importFrom(stats,na.omit)
importFrom(stats,nobs)
importFrom(stats,plogis)
importFrom(stats,poisson)
importFrom(stats,predict)
importFrom(stats,qchisq)
importFrom(stats,reformulate)
importFrom(stats,reshape)
importFrom(stats,setNames)
importFrom(stats,terms)
importFrom(stats,update)
importFrom(stats,var)
importFrom(stats,vcov)
importFrom(utils,capture.output)
importFrom(utils,tail)
insight/README.md 0000644 0001762 0000144 00000034515 13615555663 013225 0 ustar ligges users
# insight
[](https://doi.org/10.21105/joss.01412)
[](https://cran.r-project.org/package=insight)
[](https://easystats.github.io/insight/)
[](https://travis-ci.org/easystats/insight)
[](http://cranlogs.r-pkg.org/)
[](http://cranlogs.r-pkg.org/)
**Gain insight into your models\!**
When fitting any statistical model, there are many useful pieces of
information that are simultaneously calculated and stored beyond
coefficient estimates and general model fit statistics. Although there
exist some generic functions to obtain model information and data, many
package-specific modeling functions do not provide such methods to allow
users to access such valuable information.
**insight** is an R-package that fills this important gap by providing a
suite of functions to support almost any model (see a list of the many
models supported below in the **List of Supported Packages and Models**
section). The goal of **insight**, then, is to provide tools to provide
*easy*, *intuitive*, and *consistent* access to information contained in
model objects. These tools aid applied research in virtually any field
who fit, diagnose, and present statistical models by streamlining access
to every aspect of many model objects via consistent syntax and output.
Built with non-programmers in mind, **insight** offers a broad toolbox
for making model and data information easily accessible. While
**insight** offers many useful functions for working with and
understanding model objects (discussed below), we suggest users start
with `model_info()`, as this function provides a clean and consistent
overview of model objects (e.g., functional form of the model, the model
family, link function, number of observations, variables included in the
specification, etc.). With a clear understanding of the model
introduced, users are able to adapt other functions for more nuanced
exploration of and interaction with virtually any model object.
## Definition of Model Components
The functions from **insight** address different components of a model.
In an effort to avoid confusion about specific “targets” of each
function, in this section we provide a short explanation of
**insight**’s definitions of regression model components.
#### Data
The dataset used to fit the model.
#### Parameters
Values estimated or learned from data that capture the relationship
between variables. In regression models, these are usually referred to
as *coefficients*.
#### Response and Predictors
- **response**: the outcome or response variable (dependent variable)
of a regression model.
- **predictor**: independent variables of (the *fixed* part of) a
regression model. For mixed models, variables that are only in the
*random effects* part (i.e. grouping factors) of the model are not
returned as predictors by default. However, these can be included
using additional arguments in the function call, treating predictors
are “unique”. As such, if a variable appears as a fixed effect and a
random slope, it is treated as one (the same) predictor.
#### Variables
Any unique variable names that appear in a regression model, e.g.,
response variable, predictors or random effects. A “variable” only
relates to the unique occurence of a term, or the term name. For
instance, the expression `x + poly(x, 2)` has only the variable `x`.
#### Terms
Terms themselves consist of variable and factor names separated by
operators, or involve arithmetic expressions. For instance, the
expression `x + poly(x, 2)` has *one* variable `x`, but *two* terms `x`
and `poly(x, 2)`.
#### Random Effects
- **random slopes**: variables that are specified as random slopes in
a mixed effects model.
- **random or grouping factors**: variables that are specified as
grouping variables in a mixed effects model.
*Aren’t the predictors, terms and parameters the same thing?*
In some cases, yes. But not in all cases. Find out more by [**clicking
here to access the
documentation**](https://easystats.github.io/insight/articles/insight.html).
## Functions
The package revolves around two key prefixes: `get_*` and `find_*`. The
`get_*` prefix extracts *values* (or *data*) associated with
model-specific objects (e.g., parameters or variables), while the
`find_*` prefix *lists* model-specific objects (e.g., priors or
predictors). These are powerful families of functions allowing for great
flexibility in use, whether at a high, descriptive level (`find_*`) or
narrower level of statistical inspection and reporting (`get_*`).

In total, the **insight** package includes 16 core functions:
[get\_data()](https://easystats.github.io/insight/reference/get_data.html),
[get\_priors()](https://easystats.github.io/insight/reference/get_priors.html),
[get\_variance()](https://easystats.github.io/insight/reference/get_variance.html),
[get\_parameters()](https://easystats.github.io/insight/reference/get_parameters.html),
[get\_predictors()](https://easystats.github.io/insight/reference/get_predictors.html),
[get\_random()](https://easystats.github.io/insight/reference/get_random.html),
[get\_response()](https://easystats.github.io/insight/reference/get_response.html),
[find\_algorithm()](https://easystats.github.io/insight/reference/find_algorithm.html),
[find\_formula()](https://easystats.github.io/insight/reference/find_formula.html),
[find\_variables()](https://easystats.github.io/insight/reference/find_variables.html),
[find\_terms()](https://easystats.github.io/insight/reference/find_terms.html),
[find\_parameters()](https://easystats.github.io/insight/reference/find_parameters.html),
[find\_predictors()](https://easystats.github.io/insight/reference/find_predictors.html),
[find\_random()](https://easystats.github.io/insight/reference/find_random.html),
[find\_response()](https://easystats.github.io/insight/reference/find_response.html),
and
[model\_info()](https://easystats.github.io/insight/reference/model_info.html).
In all cases, users must supply at a minimum, the name of the model fit
object. In several functions, there are additional arguments that allow
for more targeted returns of model information. For example, the
`find_terms()` function’s `effects` argument allows for the extraction
of “fixed effects” terms, “random effects” terms, or by default, “all”
terms in the model object. We point users to the package documentation
or the complementary package website,
, for a detailed list of the
arguments associated with each function as well as the returned values
from each function.
## Examples of Use Cases in R
We now would like to provide examples of use cases of the **insight**
package. These examples probably do not cover typical real-world
problems, but serve as illustration of the core idea of this package:
The unified interface to access model information. **insight** should
help both users and package developers in order to reduce the hassle
with the many exceptions from various modelling packages when accessing
model information.
#### Making Predictions at Specific Values of a Term of Interest
Say, the goal is to make predictions for a certain term, holding
remaining co-variates constant. This is achieved by calling `predict()`
and feeding the `newdata`-argument with the values of the term of
interest as well as the “constant” values for remaining co-variates. The
functions `get_data()` and `find_predictors()` are used to get this
information, which then can be used in the call to `predict()`.
In this example, we fit a simple linear model, but it could be replaced
by (m)any other models, so this approach is “universal” and applies to
many different model objects.
``` r
library(insight)
m <- lm(Sepal.Length ~ Species + Petal.Width + Sepal.Width, data = iris)
dat <- get_data(m)
pred <- find_predictors(m, flatten = TRUE)
l <- lapply(pred, function(x) {
if (is.numeric(dat[[x]]))
mean(dat[[x]]) else unique(dat[[x]])
})
names(l) <- pred
l <- as.data.frame(l)
cbind(l, predictions = predict(m, newdata = l))
#> Species Petal.Width Sepal.Width predictions
#> 1 setosa 1.2 3.1 5.1
#> 2 versicolor 1.2 3.1 6.1
#> 3 virginica 1.2 3.1 6.3
```
#### Printing Model Coefficients
The next example should emphasize the possibilities to generalize
functions to many different model objects using **insight**. The aim is
simply to print coefficients in a complete, human readable sentence.
The first approach uses the functions that are available for some, but
obviously not for all models, to access the information about model
coefficients.
``` r
print_params <- function(model) {
paste0("My parameters are ", paste0(row.names(summary(model)$coefficients), collapse = ", "),
", thank you for your attention!")
}
m1 <- lm(Sepal.Length ~ Petal.Width, data = iris)
print_params(m1)
#> [1] "My parameters are (Intercept), Petal.Width, thank you for your attention!"
# obviously, something is missing in the output
m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris)
print_params(m2)
#> [1] "My parameters are , thank you for your attention!"
```
As we can see, the function fails for *gam*-models. As the access to
models depends on the type of the model in the R ecosystem, we would
need to create specific functions for all models types. With
**insight**, users can write a function without having to worry about
the model type.
``` r
print_params <- function(model) {
paste0("My parameters are ", paste0(insight::find_parameters(model, flatten = TRUE),
collapse = ", "), ", thank you for your attention!")
}
m1 <- lm(Sepal.Length ~ Petal.Width, data = iris)
print_params(m1)
#> [1] "My parameters are (Intercept), Petal.Width, thank you for your attention!"
m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris)
print_params(m2)
#> [1] "My parameters are (Intercept), Petal.Width, s(Petal.Length), thank you for your attention!"
```
## Installation
Run the following to install the latest GitHub-version of **insight**:
``` r
install.packages("devtools")
devtools::install_github("easystats/insight")
```
Or install the latest stable release from CRAN:
``` r
install.packages("insight")
```
## Documentation
Please visit for documentation.
## Contributing and Support
In case you want to file an issue or contribute in another way to the
package, please follow [this
guide](https://github.com/easystats/insight/blob/master/.github/CONTRIBUTING.md).
For questions about the functionality, you may either contact us via
email or also file an issue.
## List of Supported Models by Class
``` r
supported_models()
#> [1] "aareg" "aov" "aovlist"
#> [4] "bamlss" "bamlss.frame" "bayesx"
#> [7] "BBmm" "BBreg" "betareg"
#> [10] "BFBayesFactor" "bigglm" "biglm"
#> [13] "blavaan" "bracl" "brglm"
#> [16] "brmsfit" "brmultinom" "censReg"
#> [19] "cgam" "cgamm" "cglm"
#> [22] "clm" "clm2" "clmm"
#> [25] "clmm2" "complmrob" "coxme"
#> [28] "coxph" "cpglm" "cpglmm"
#> [31] "crch" "crq" "crqs"
#> [34] "DirichletRegModel" "feglm" "feis"
#> [37] "felm" "fixest" "flexsurvreg"
#> [40] "gam" "Gam" "gamlss"
#> [43] "gamm" "gamm4" "gbm"
#> [46] "gee" "geeglm" "glimML"
#> [49] "glm" "glmmadmb" "glmmPQL"
#> [52] "glmmTMB" "glmrob" "glmRob"
#> [55] "glmx" "gls" "gmnl"
#> [58] "htest" "hurdle" "iv_robust"
#> [61] "ivreg" "lavaan" "lm"
#> [64] "lm_robust" "lme" "lmrob"
#> [67] "lmRob" "logistf" "LORgee"
#> [70] "lrm" "MANOVA" "maxLik"
#> [73] "mclogit" "mcmc" "MCMCglmm"
#> [76] "merMod" "mixed" "MixMod"
#> [79] "mixor" "mlm" "mlogit"
#> [82] "mmlogit" "multinom" "ols"
#> [85] "plm" "polr" "psm"
#> [88] "rlm" "rlmerMod" "RM"
#> [91] "rma" "rma.uni" "rq"
#> [94] "rqss" "speedglm" "speedlm"
#> [97] "stanmvreg" "stanreg" "survfit"
#> [100] "survreg" "svyglm" "svyolr"
#> [103] "tobit" "truncreg" "vgam"
#> [106] "vglm" "wbgee" "wblm"
#> [109] "wbm" "zeroinfl" "zerotrunc"
```
- **Didn’t find a model?** [File an
issue](https://github.com/easystats/insight/issues) and request
additional model-support in *insight*\!
## Credits
If this package helped you, please consider citing as follows:
Lüdecke D, Waggoner P, Makowski D. insight: A Unified Interface to
Access Information from Model Objects in R. Journal of Open Source
Software 2019;4:1412. doi:
[10.21105/joss.01412](https://doi.org/10.21105/joss.01412)
insight/man/ 0000755 0001762 0000144 00000000000 13602213235 012467 5 ustar ligges users insight/man/clean_names.Rd 0000644 0001762 0000144 00000003077 13566471215 015247 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clean_names.R
\name{clean_names}
\alias{clean_names}
\title{Get clean names of model terms}
\usage{
clean_names(x)
}
\arguments{
\item{x}{A fitted model, or a character vector.}
}
\value{
The "cleaned" variable names as character vector, i.e. pattern
like \code{s()} for splines or \code{log()} are removed from
the model terms.
}
\description{
This function "cleans" names of model terms (or a character
vector with such names) by removing patterns like \code{log()} or
\code{as.factor()} etc.
}
\note{
Typically, this method is intended to work on character vectors,
in order to remove patterns that obscure the variable names. For
convenience reasons it is also possible to call \code{clean_names()}
also on a model object. If \code{x} is a regression model, this
function is (almost) equal to calling \code{find_variables()}. The
main difference is that \code{clean_names()} always returns a character
vector, while \code{find_variables()} returns a list of character
vectors, unless \code{flatten = TRUE}. See 'Examples'.
}
\examples{
# example from ?stats::glm
counts <- c(18, 17, 15, 20, 10, 20, 25, 13, 12)
outcome <- c(gl(3, 1, 9))
treatment <- gl(3, 3)
m <- glm(counts ~ log(outcome) + as.factor(treatment), family = poisson())
clean_names(m)
# difference "clean_names()" and "find_variables()"
library(lme4)
m <- glmer(
cbind(incidence, size - incidence) ~ period + (1 | herd),
data = cbpp,
family = binomial
)
clean_names(m)
find_variables(m)
find_variables(m, flatten = TRUE)
}
insight/man/find_random.Rd 0000644 0001762 0000144 00000002725 13566471215 015261 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_random.R
\name{find_random}
\alias{find_random}
\title{Find names of random effects}
\usage{
find_random(x, split_nested = FALSE, flatten = FALSE)
}
\arguments{
\item{x}{A fitted mixed model.}
\item{split_nested}{Logical, if \code{TRUE}, terms from nested random
effects will be returned as separated elements, not as single string
with colon. See 'Examples'.}
\item{flatten}{Logical, if \code{TRUE}, the values are returned
as character vector, not as list. Duplicated values are removed.}
}
\value{
A list of character vectors that represent the name(s) of the
random effects (grouping factors). Depending on the model, the
returned list has following elements:
\itemize{
\item \code{random}, the "random effects" terms from the conditional part of model
\item \code{zero_inflated_random}, the "random effects" terms from the zero-inflation component of the model
}
}
\description{
Return the name of the grouping factors from mixed effects models.
}
\examples{
library(lme4)
data(sleepstudy)
sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE)
sleepstudy$mysubgrp <- NA
for (i in 1:5) {
filter_group <- sleepstudy$mygrp == i
sleepstudy$mysubgrp[filter_group] <-
sample(1:30, size = sum(filter_group), replace = TRUE)
}
m <- lmer(
Reaction ~ Days + (1 | mygrp / mysubgrp) + (1 | Subject),
data = sleepstudy
)
find_random(m)
find_random(m, split_nested = TRUE)
}
insight/man/find_parameters.Rd 0000644 0001762 0000144 00000010371 13600225174 016126 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_parameters.R, R/get_parameters.R
\name{find_parameters}
\alias{find_parameters}
\alias{find_parameters.gam}
\alias{find_parameters.merMod}
\alias{find_parameters.zeroinfl}
\alias{find_parameters.hurdle}
\alias{find_parameters.BFBayesFactor}
\alias{find_parameters.brmsfit}
\alias{find_parameters.bayesx}
\alias{find_parameters.stanreg}
\alias{find_parameters.sim.merMod}
\alias{get_parameters.bayesx}
\title{Find names of model parameters}
\usage{
find_parameters(x, ...)
\method{find_parameters}{gam}(
x,
component = c("all", "conditional", "smooth_terms"),
flatten = FALSE,
...
)
\method{find_parameters}{merMod}(x, effects = c("all", "fixed", "random"), flatten = FALSE, ...)
\method{find_parameters}{zeroinfl}(
x,
component = c("all", "conditional", "zi", "zero_inflated"),
flatten = FALSE,
...
)
\method{find_parameters}{hurdle}(
x,
component = c("all", "conditional", "zi", "zero_inflated"),
flatten = FALSE,
...
)
\method{find_parameters}{BFBayesFactor}(
x,
effects = c("all", "fixed", "random"),
component = c("all", "extra"),
flatten = FALSE,
...
)
\method{find_parameters}{brmsfit}(
x,
effects = c("all", "fixed", "random"),
component = c("all", "conditional", "zi", "zero_inflated", "dispersion", "simplex",
"sigma", "smooth_terms"),
flatten = FALSE,
parameters = NULL,
...
)
\method{find_parameters}{bayesx}(
x,
component = c("all", "conditional", "smooth_terms"),
flatten = FALSE,
parameters = NULL,
...
)
\method{find_parameters}{stanreg}(
x,
effects = c("all", "fixed", "random"),
component = c("all", "conditional", "smooth_terms"),
flatten = FALSE,
parameters = NULL,
...
)
\method{find_parameters}{sim.merMod}(
x,
effects = c("all", "fixed", "random"),
flatten = FALSE,
parameters = NULL,
...
)
\method{get_parameters}{bayesx}(
x,
component = c("all", "conditional", "smooth_terms"),
flatten = FALSE,
parameters = NULL,
...
)
}
\arguments{
\item{x}{A fitted model.}
\item{...}{Currently not used.}
\item{component}{Should all parameters, parameters for the
conditional model, the zero-inflated part of the model, the dispersion
term or the instrumental variables be returned? Applies to models
with zero-inflated and/or dispersion formula, or to models with instrumental
variable (so called fixed-effects regressions). May be abbreviated. Note that the
\emph{conditional} component is also called \emph{count} or \emph{mean}
component, depending on the model.}
\item{flatten}{Logical, if \code{TRUE}, the values are returned
as character vector, not as list. Duplicated values are removed.}
\item{effects}{Should parameters for fixed effects, random effects
or both be returned? Only applies to mixed models. May be abbreviated.}
\item{parameters}{Regular expression pattern that describes the parameters that
should be returned.}
}
\value{
A list of parameter names. For simple models, only one list-element,
\code{conditional}, is returned. For more complex models, the returned
list may have following elements:
\itemize{
\item \code{conditional}, the "fixed effects" part from the model
\item \code{random}, the "random effects" part from the model
\item \code{zero_inflated}, the "fixed effects" part from the zero-inflation component of the model
\item \code{zero_inflated_random}, the "random effects" part from the zero-inflation component of the model
\item \code{dispersion}, the dispersion parameters
\item \code{simplex}, simplex parameters of monotonic effects (\pkg{brms} only)
\item \code{smooth_terms}, the smooth parameters
}
}
\description{
Returns the names of model parameters, like they typically
appear in the \code{summary()} output. For Bayesian models, the parameter
names equal the column names of the posterior samples after coercion
from \code{as.data.frame()}.
}
\details{
In most cases when models either return different "effects" (fixed,
random) or "components" (conditional, zero-inflated, ...), the arguments
\code{effects} and \code{component} can be used. Not all model classes that
support these arguments are listed here in the 'Usage' section.
}
\examples{
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
find_parameters(m)
}
insight/man/find_statistic.Rd 0000644 0001762 0000144 00000001346 13566471215 016006 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_statistic.R
\name{find_statistic}
\alias{find_statistic}
\title{Find statistic for model}
\usage{
find_statistic(x, ...)
}
\arguments{
\item{x}{An object.}
\item{...}{Currently not used.}
}
\value{
A character describing the type of statistic. If there is no
statistic available with a distribution, \code{NULL} will be returned.
}
\description{
Returns the statistic for a regression model (\emph{t}-statistic,
\emph{z}-statistic, etc.).
Small helper that checks if a model is a regression model
object and return the statistic used.
}
\examples{
# regression model object
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
find_statistic(m)
}
insight/man/is_model_supported.Rd 0000644 0001762 0000144 00000001670 13566471215 016677 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is_model_supported.R
\name{is_model_supported}
\alias{is_model_supported}
\alias{supported_models}
\title{Checks if an object is a regression model object supported in
\pkg{insight} package.}
\usage{
is_model_supported(x)
supported_models()
}
\arguments{
\item{x}{An object.}
}
\value{
A logical, \code{TRUE} if \code{x} is a (supported) model object.
}
\description{
Small helper that checks if a model is a \emph{supported}
(regression) model object. \code{supported_models()} prints a list
of currently supported model classes.
}
\details{
This function returns \code{TRUE} if \code{x} is a model object
that works with the package's functions. A list of supported models can
also be found here: \url{https://github.com/easystats/insight}.
}
\examples{
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
is_model_supported(m)
is_model_supported(mtcars)
}
insight/man/print_color.Rd 0000644 0001762 0000144 00000001572 13566471215 015332 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_color.R
\name{print_color}
\alias{print_color}
\alias{print_colour}
\title{Coloured console output}
\usage{
print_color(text, color)
print_colour(text, colour)
}
\arguments{
\item{text}{The text to print.}
\item{color, colour}{Character vector, indicating the colour for printing.
May be one of \code{"red"}, \code{"yellow"}, \code{"green"}, \code{"blue"},
\code{"violet"}, \code{"cyan"} or \code{"grey"}. Formatting is also possible
with \code{"bold"} or \code{"italic"}.}
}
\value{
Nothing.
}
\description{
Convenient function that allows coloured output in the console.
Mainly implemented to reduce package dependencies.
}
\details{
This function prints \code{text} directly to the console using
\code{cat()}, so no string is returned.
}
\examples{
print_color("I'm blue dabedi dabedei", "blue")
}
insight/man/all_models_equal.Rd 0000644 0001762 0000144 00000002066 13566471215 016301 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/all_equal_models.R
\name{all_models_equal}
\alias{all_models_equal}
\alias{all_models_same_class}
\title{Checks if all objects are models of same class}
\usage{
all_models_equal(..., verbose = FALSE)
all_models_same_class(..., verbose = FALSE)
}
\arguments{
\item{...}{A list of objects.}
\item{verbose}{Toggle off warnings.}
}
\value{
A logical, \code{TRUE} if \code{x} are all supported model objects
of same class.
}
\description{
Small helper that checks if all objects are \emph{supported}
(regression) model objects and of same class.
}
\examples{
library(lme4)
data(mtcars)
data(sleepstudy)
m1 <- lm(mpg ~ wt + cyl + vs, data = mtcars)
m2 <- lm(mpg ~ wt + cyl, data = mtcars)
m3 <- lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy)
m4 <- glm(formula = vs ~ wt, family = binomial(), data = mtcars)
all_models_same_class(m1, m2)
all_models_same_class(m1, m2, m3)
all_models_same_class(m1, m4, m2, m3, verbose = TRUE)
all_models_same_class(m1, m4, mtcars, m2, m3, verbose = TRUE)
}
insight/man/find_variables.Rd 0000644 0001762 0000144 00000005601 13602442163 015734 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_variables.R
\name{find_variables}
\alias{find_variables}
\title{Find names of all variables}
\usage{
find_variables(
x,
effects = c("all", "fixed", "random"),
component = c("all", "conditional", "zi", "zero_inflated", "dispersion",
"instruments", "smooth_terms"),
flatten = FALSE
)
}
\arguments{
\item{x}{A fitted model.}
\item{effects}{Should variables for fixed effects, random effects
or both be returned? Only applies to mixed models. May be abbreviated.}
\item{component}{Should all predictor variables, predictor variables for the
conditional model, the zero-inflated part of the model, the dispersion
term or the instrumental variables be returned? Applies to models
with zero-inflated and/or dispersion formula, or to models with instrumental
variable (so called fixed-effects regressions). May be abbreviated. Note that the
\emph{conditional} component is also called \emph{count} or \emph{mean}
component, depending on the model.}
\item{flatten}{Logical, if \code{TRUE}, the values are returned
as character vector, not as list. Duplicated values are removed.}
}
\value{
A list with (depending on the model) following elements (character
vectors):
\itemize{
\item \code{response}, the name of the response variable
\item \code{conditional}, the names of the predictor variables from the \emph{conditional} model (as opposed to the zero-inflated part of a model)
\item \code{random}, the names of the random effects (grouping factors)
\item \code{zero_inflated}, the names of the predictor variables from the \emph{zero-inflated} part of the model
\item \code{zero_inflated_random}, the names of the random effects (grouping factors)
\item \code{dispersion}, the name of the dispersion terms
\item \code{instruments}, the names of instrumental variables
}
}
\description{
Returns a list with the names of all variables, including
response value and random effects.
}
\note{
The difference to \code{\link{find_terms}} is that \code{find_variables()}
returns each variable name only once, while \code{find_terms()} may return a
variable multiple times in case of transformations or when arithmetic expressions
were used in the formula.
}
\examples{
library(lme4)
data(cbpp)
data(sleepstudy)
# some data preparation...
cbpp$trials <- cbpp$size - cbpp$incidence
sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE)
sleepstudy$mysubgrp <- NA
for (i in 1:5) {
filter_group <- sleepstudy$mygrp == i
sleepstudy$mysubgrp[filter_group] <-
sample(1:30, size = sum(filter_group), replace = TRUE)
}
m1 <- glmer(
cbind(incidence, size - incidence) ~ period + (1 | herd),
data = cbpp,
family = binomial
)
find_variables(m1)
m2 <- lmer(
Reaction ~ Days + (1 | mygrp / mysubgrp) + (1 | Subject),
data = sleepstudy
)
find_variables(m2)
find_variables(m2, flatten = TRUE)
}
insight/man/model_info.Rd 0000644 0001762 0000144 00000006370 13615526401 015105 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_info.R
\name{model_info}
\alias{model_info}
\title{Access information from model objects}
\usage{
model_info(x, ...)
}
\arguments{
\item{x}{A fitted model.}
\item{...}{Currently not used.}
}
\value{
A list with information about the model, like family, link-function
etc. (see 'Details').
}
\description{
Retrieve information from model objects.
}
\details{
\code{model_info()} returns a list with information about the
model for many different model objects. Following information
is returned, where all values starting with \code{is_} are logicals.
\itemize{
\item \code{is_binomial}: family is binomial (but not negative binomial)
\item \code{is_poisson}: family is poisson
\item \code{is_negbin}: family is negative binomial
\item \code{is_count}: model is a count model (i.e. family is either poisson or negative binomial)
\item \code{is_beta}: family is beta
\item \code{is_betabinomial}: family is beta-binomial
\item \code{is_dirichlet}: family is dirichlet
\item \code{is_exponential}: family is exponential (e.g. Gamma or Weibull)
\item \code{is_logit}: model has logit link
\item \code{is_progit}: model has probit link
\item \code{is_linear}: family is gaussian
\item \code{is_tweedie}: family is tweedie
\item \code{is_ordinal}: family is ordinal, multinomial, or cumulative link
\item \code{is_cumulative}: family is ordinal, multinomial, or cumulative link
\item \code{is_multinomial}: family is multinomial or categorical link
\item \code{is_categorical}: family is categorical link
\item \code{is_censored}: model is a censored model (has a censored response, including survival models)
\item \code{is_truncated}: model is a truncated model (has a truncated response)
\item \code{is_survival}: model is a survival model
\item \code{is_zero_inflated}: model has zero-inflation component
\item \code{is_hurdle}: model has zero-inflation component and is a hurdle-model (truncated family distribution)
\item \code{is_mixed}: model is a mixed effects model (with random effects)
\item \code{is_multivariate}: model is a multivariate response model (currently only works for \emph{brmsfit} objects)
\item \code{is_trial}: model response contains additional information about the trials
\item \code{is_bayesian}: model is a Bayesian model
\item \code{is_anova}: model is an Anova object
\item \code{link_function}: the link-function
\item \code{family}: the family-object
\item \code{n_obs}: number of observations
\item \code{model_terms}: a list with all model terms, including terms such as random effects or from zero-inflated model parts.
}
}
\examples{
ldose <- rep(0:5, 2)
numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
sex <- factor(rep(c("M", "F"), c(6, 6)))
SF <- cbind(numdead, numalive = 20 - numdead)
dat <- data.frame(ldose, sex, SF, stringsAsFactors = FALSE)
m <- glm(SF ~ sex * ldose, family = binomial)
model_info(m)
\dontrun{
library(glmmTMB)
data("Salamanders")
m <- glmmTMB(
count ~ spp + cover + mined + (1 | site),
ziformula = ~ spp + mined,
dispformula = ~DOY,
data = Salamanders,
family = nbinom2
)
}
model_info(m)
}
insight/man/get_statistic.Rd 0000644 0001762 0000144 00000004356 13613304134 015635 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_statistic.R
\name{get_statistic}
\alias{get_statistic}
\alias{get_statistic.default}
\alias{get_statistic.glmmTMB}
\alias{get_statistic.clm2}
\alias{get_statistic.gee}
\alias{get_statistic.betareg}
\alias{get_statistic.DirichletRegModel}
\title{Get statistic associated with estimates}
\usage{
get_statistic(x, ...)
\method{get_statistic}{default}(x, column_index = 3, ...)
\method{get_statistic}{glmmTMB}(
x,
component = c("all", "conditional", "zi", "zero_inflated"),
...
)
\method{get_statistic}{clm2}(x, component = c("all", "conditional", "scale"), ...)
\method{get_statistic}{gee}(x, robust = FALSE, ...)
\method{get_statistic}{betareg}(x, component = c("all", "conditional", "precision"), ...)
\method{get_statistic}{DirichletRegModel}(x, component = c("all", "conditional", "precision"), ...)
}
\arguments{
\item{x}{A model.}
\item{...}{Currently not used.}
\item{column_index}{For model objects that have no defined \code{get_statistic()}
method yet, the default method is called. This method tries to extract the
statistic column from \code{coef(summary())}, where the index of the column
that is being pulled is \code{column_index}. Defaults to 3, which is the
default statistic column for most models' summary-output.}
\item{component}{Should all parameters, parameters for the conditional model,
or for the zero-inflated part of the model be returned? Applies to models
with zero-inflated component. \code{component} may be one of
\code{"conditional"}, \code{"zi"}, \code{"zero-inflated"} or \code{"all"}
(default). For models with smooth terms, \code{component = "smooth_terms"}
is also possible. May be abbreviated. Note that the \emph{conditional}
component is also called \emph{count} or \emph{mean} component, depending
on the model.}
\item{robust}{Logical, if \code{TRUE}, test statistic based on robust standard
errors is returned.}
}
\value{
A data frame with the model's parameter names and the related test statistic.
}
\description{
Returns the statistic (\emph{t}, \code{z}, ...) for model estimates.
In most cases, this is the related column from \code{coef(summary())}.
}
\examples{
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
get_statistic(m)
}
insight/man/find_predictors.Rd 0000644 0001762 0000144 00000004763 13602442163 016152 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_predictors.R
\name{find_predictors}
\alias{find_predictors}
\title{Find names of model predictors}
\usage{
find_predictors(
x,
effects = c("fixed", "random", "all"),
component = c("all", "conditional", "zi", "zero_inflated", "dispersion",
"instruments", "correlation", "smooth_terms"),
flatten = FALSE
)
}
\arguments{
\item{x}{A fitted model.}
\item{effects}{Should variables for fixed effects, random effects
or both be returned? Only applies to mixed models. May be abbreviated.}
\item{component}{Should all predictor variables, predictor variables for the
conditional model, the zero-inflated part of the model, the dispersion
term or the instrumental variables be returned? Applies to models
with zero-inflated and/or dispersion formula, or to models with instrumental
variable (so called fixed-effects regressions). May be abbreviated. Note that the
\emph{conditional} component is also called \emph{count} or \emph{mean}
component, depending on the model.}
\item{flatten}{Logical, if \code{TRUE}, the values are returned
as character vector, not as list. Duplicated values are removed.}
}
\value{
A list of character vectors that represent the name(s) of the
predictor variables. Depending on the combination of the arguments
\code{effects} and \code{component}, the returned list has following
elements:
\itemize{
\item \code{conditional}, the "fixed effects" terms from the model
\item \code{random}, the "random effects" terms from the model
\item \code{zero_inflated}, the "fixed effects" terms from the zero-inflation component of the model
\item \code{zero_inflated_random}, the "random effects" terms from the zero-inflation component of the model
\item \code{dispersion}, the dispersion terms
\item \code{instruments}, for fixed-effects regressions like \code{ivreg}, \code{felm} or \code{plm}, the instrumental variables
\item \code{correlation}, for models with correlation-component like \code{gls}, the variables used to describe the correlation structure
}
}
\description{
Returns the names of the predictor variables for the
different parts of a model (like fixed or random effects, zero-inflated
component, ...). Unlike \code{\link{find_parameters}}, the names from
\code{find_predictors()} match the original variable names from the data
that was used to fit the model.
}
\examples{
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
find_predictors(m)
}
insight/man/find_algorithm.Rd 0000644 0001762 0000144 00000002623 13566471215 015764 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_algorithm.R
\name{find_algorithm}
\alias{find_algorithm}
\title{Find sampling algorithm and optimizers}
\usage{
find_algorithm(x, ...)
}
\arguments{
\item{x}{A fitted model.}
\item{...}{Currently not used.}
}
\value{
A list with elements depending on the model.
\cr
For frequentist models:
\itemize{
\item \code{algorithm}, for instance \code{"OLS"} or \code{"ML"}
\item \code{optimizer}, name of optimizing function, only applies to specific models (like \code{gam})
}
For frequentist mixed models:
\itemize{
\item \code{algorithm}, for instance \code{"REML"} or \code{"ML"}
\item \code{optimizer}, name of optimizing function
}
For Bayesian models:
\itemize{
\item \code{algorithm}, the algorithm
\item \code{chains}, number of chains
\item \code{iterations}, number of iterations per chain
\item \code{warmup}, number of warmups per chain
}
}
\description{
Returns information on the sampling or estimation algorithm
as well as optimization functions, or for Bayesian model information on
chains, iterations and warmup-samples.
}
\examples{
library(lme4)
data(sleepstudy)
m <- lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy)
find_algorithm(m)
\dontrun{
library(rstanarm)
m <- stan_lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy)
find_algorithm(m)
}
}
insight/man/find_interactions.Rd 0000644 0001762 0000144 00000003530 13571265241 016472 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_interactions.R
\name{find_interactions}
\alias{find_interactions}
\title{Find interaction terms from models}
\usage{
find_interactions(
x,
component = c("all", "conditional", "zi", "zero_inflated", "dispersion",
"instruments"),
flatten = FALSE
)
}
\arguments{
\item{x}{A fitted model.}
\item{component}{Should all predictor variables, predictor variables for the
conditional model, the zero-inflated part of the model, the dispersion
term or the instrumental variables be returned? Applies to models
with zero-inflated and/or dispersion formula, or to models with instrumental
variable (so called fixed-effects regressions). May be abbreviated. Note that the
\emph{conditional} component is also called \emph{count} or \emph{mean}
component, depending on the model.}
\item{flatten}{Logical, if \code{TRUE}, the values are returned
as character vector, not as list. Duplicated values are removed.}
}
\value{
A list of character vectors that represent the interaction terms.
Depending on \code{component}, the returned list has following
elements (or \code{NULL}, if model has no interaction term):
\itemize{
\item \code{conditional}, interaction terms that belong to the "fixed effects" terms from the model
\item \code{zero_inflated}, interaction terms that belong to the "fixed effects" terms from the zero-inflation component of the model
\item \code{instruments}, for fixed-effects regressions like \code{ivreg}, \code{felm} or \code{plm}, interaction terms that belong to the instrumental variables
}
}
\description{
Returns all lowest to highest order interaction terms from a model.
}
\examples{
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
find_interactions(m)
m <- lm(mpg ~ wt * cyl + vs * hp * gear + carb, data = mtcars)
find_interactions(m)
}
insight/man/find_response.Rd 0000644 0001762 0000144 00000001667 13566471215 015643 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_response.R
\name{find_response}
\alias{find_response}
\title{Find name of the response variable}
\usage{
find_response(x, combine = TRUE)
}
\arguments{
\item{x}{A fitted model.}
\item{combine}{Logical, if \code{TRUE} and the response is a matrix-column,
the name of the response matches the notation in formula, and would for
instance also contain patterns like \code{"cbind(...)"}. Else, the original
variable names from the matrix-column are returned. See 'Examples'.}
}
\value{
The name(s) of the response variable(s) from \code{x} as character vector.
}
\description{
Returns the name(s) of the response variable(s) from a model object.
}
\examples{
library(lme4)
data(cbpp)
cbpp$trials <- cbpp$size - cbpp$incidence
m <- glm(cbind(incidence, trials) ~ period, data = cbpp, family = binomial)
find_response(m, combine = TRUE)
find_response(m, combine = FALSE)
}
insight/man/is_model.Rd 0000644 0001762 0000144 00000001075 13566471215 014571 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is_model.R
\name{is_model}
\alias{is_model}
\title{Checks if an object is a regression model object}
\usage{
is_model(x)
}
\arguments{
\item{x}{An object.}
}
\value{
A logical, \code{TRUE} if \code{x} is a (supported) model object.
}
\description{
Small helper that checks if a model is a regression model
object.
}
\details{
This function returns \code{TRUE} if \code{x} is a model object.
}
\examples{
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
is_model(m)
is_model(mtcars)
}
insight/man/get_variance.Rd 0000644 0001762 0000144 00000015750 13602214466 015424 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_variances.R
\name{get_variance}
\alias{get_variance}
\alias{get_variance_residual}
\alias{get_variance_fixed}
\alias{get_variance_random}
\alias{get_variance_distribution}
\alias{get_variance_dispersion}
\alias{get_variance_intercept}
\alias{get_variance_slope}
\alias{get_correlation_slope_intercept}
\title{Get variance components from random effects models}
\usage{
get_variance(
x,
component = c("all", "fixed", "random", "residual", "distribution", "dispersion",
"intercept", "slope", "rho01"),
verbose = TRUE,
...
)
get_variance_residual(x, ...)
get_variance_fixed(x, ...)
get_variance_random(x, ...)
get_variance_distribution(x, ...)
get_variance_dispersion(x, ...)
get_variance_intercept(x, ...)
get_variance_slope(x, ...)
get_correlation_slope_intercept(x, ...)
}
\arguments{
\item{x}{A mixed effects model.}
\item{component}{Character value, indicating the variance component that should
be returned. By default, all variance components are returned. The
distribution-specific (\code{"distribution"}) and residual (\code{"residual"})
variance are the most computational intensive components, and hence may
take a few seconds to calculate.}
\item{verbose}{Toggle off warnings.}
\item{...}{Currently not used.}
}
\value{
A list with following elements:
\itemize{
\item \code{var.fixed}, variance attributable to the fixed effects
\item \code{var.random}, (mean) variance of random effects
\item \code{var.residual}, residual variance (sum of dispersion and distribution)
\item \code{var.distribution}, distribution-specific variance
\item \code{var.dispersion}, variance due to additive dispersion
\item \code{var.intercept}, the random-intercept-variance, or between-subject-variance (\ifelse{html}{\out{τ00}}{\eqn{\tau_{00}}})
\item \code{var.slope}, the random-slope-variance (\ifelse{html}{\out{τ11}}{\eqn{\tau_{11}}})
\item \code{cor.slope_intercept}, the random-slope-intercept-correlation (\ifelse{html}{\out{ρ01}}{\eqn{\rho_{01}}})
}
}
\description{
This function extracts the different variance components of a
mixed model and returns the result as list. Functions like
\code{get_variance_residual(x)} or \code{get_variance_fixed(x)} are shortcuts
for \code{get_variance(x, component = "residual")} etc.
}
\details{
This function returns different variance components from mixed models,
which are needed, for instance, to calculate r-squared measures or the
intraclass-correlation coefficient (ICC).
\subsection{Fixed effects variance}{
The fixed effects variance, \ifelse{html}{\out{σ2f}}{\eqn{\sigma^2_f}},
is the variance of the matrix-multiplication \ifelse{html}{\out{β∗X}}{\eqn{\beta*X}}
(parameter vector by model matrix).
}
\subsection{Random effects variance}{
The random effect variance, \ifelse{html}{\out{σ2i}}{\eqn{\sigma^2_i}},
represents the \emph{mean} random effect variance of the model. Since
this variance reflect the "average" random effects variance for mixed
models, it is also appropriate for models with more complex random
effects structures, like random slopes or nested random effects.
Details can be found in \cite{Johnson 2014}, in particular equation 10.
For simple random-intercept models, the random effects variance equals
the random-intercept variance.
}
\subsection{Distribution-specific variance}{
The distribution-specific variance,
\ifelse{html}{\out{σ2d}}{\eqn{\sigma^2_d}},
depends on the model family. For Gaussian models, it is
\ifelse{html}{\out{σ2}}{\eqn{\sigma^2}} (i.e.
\code{sigma(model)^2}). For models with binary outcome, it is
\eqn{\pi^2 / 3} for logit-link and \code{1} for probit-link. For all
other models, the distribution-specific variance is based on lognormal
approximation, \eqn{log(1 + var(x) / \mu^2)} (see \cite{Nakagawa et al. 2017}).
The expected variance of a zero-inflated model is computed according
to \cite{Zuur et al. 2012, p277}.
}
\subsection{Variance for the additive overdispersion term}{
The variance for the additive overdispersion term,
\ifelse{html}{\out{σ2e}}{\eqn{\sigma^2_e}},
represents \dQuote{the excess variation relative to what is expected
from a certain distribution} (Nakagawa et al. 2017). In (most? many?)
cases, this will be \code{0}.
}
\subsection{Residual variance}{
The residual variance, \ifelse{html}{\out{σ2ε}}{\eqn{\sigma^2_\epsilon}},
is simply \ifelse{html}{\out{σ2d + σ2e}}{\eqn{\sigma^2_d + \sigma^2_e}}.
}
\subsection{Random intercept variance}{
The random intercept variance, or \emph{between-subject} variance
(\ifelse{html}{\out{τ00}}{\eqn{\tau_{00}}}),
is obtained from \code{VarCorr()}. It indicates how much groups
or subjects differ from each other, while the residual variance
\ifelse{html}{\out{σ2ε}}{\eqn{\sigma^2_\epsilon}}
indicates the \emph{within-subject variance}.
}
\subsection{Random slope variance}{
The random slope variance (\ifelse{html}{\out{τ11}}{\eqn{\tau_{11}}})
is obtained from \code{VarCorr()}. This measure is only available
for mixed models with random slopes.
}
\subsection{Random slope-intercept correlation}{
The random slope-intercept correlation
(\ifelse{html}{\out{ρ01}}{\eqn{\rho_{01}}})
is obtained from \code{VarCorr()}. This measure is only available
for mixed models with random intercepts and slopes.
}
}
\note{
This function supports models of class \code{merMod} (including models
from \pkg{blme}), \code{clmm}, \code{cpglmm}, \code{glmmadmb}, \code{glmmTMB},
\code{MixMod}, \code{lme}, \code{mixed}, \code{rlmerMod}, \code{stanreg} or
\code{wbm}. Support for objects of class \code{MixMod} (\pkg{GLMMadaptiv}) or
\code{lme} (\pkg{nlme}) is experimental and may not work for all models.
}
\examples{
\dontrun{
library(lme4)
data(sleepstudy)
m <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy)
get_variance(m)
get_variance_fixed(m)
get_variance_residual(m)
}
}
\references{
\itemize{
\item Johnson, P. C. D. (2014). Extension of Nakagawa & Schielzeth’s R2 GLMM to random slopes models. Methods in Ecology and Evolution, 5(9), 944–946. \doi{10.1111/2041-210X.12225}
\item Nakagawa, S., Johnson, P. C. D., & Schielzeth, H. (2017). The coefficient of determination R2 and intra-class correlation coefficient from generalized linear mixed-effects models revisited and expanded. Journal of The Royal Society Interface, 14(134), 20170213. \doi{10.1098/rsif.2017.0213}
\item Zuur, A. F., Savel'ev, A. A., & Ieno, E. N. (2012). Zero inflated models and generalized linear mixed models with R. Newburgh, United Kingdom: Highland Statistics.
}
}
insight/man/get_weights.Rd 0000644 0001762 0000144 00000001055 13566471215 015305 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_weights.R
\name{get_weights}
\alias{get_weights}
\title{Get the values from model weights}
\usage{
get_weights(x, ...)
}
\arguments{
\item{x}{A fitted model.}
\item{...}{Currently not used.}
}
\value{
The weighting variable, or \code{NULL} if no weights were specified.
}
\description{
Returns weighting variable of a model.
}
\examples{
data(mtcars)
mtcars$weight <- rnorm(nrow(mtcars), 1, .3)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars, weights = weight)
get_weights(m)
}
insight/man/format_table.Rd 0000644 0001762 0000144 00000002062 13566471215 015432 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format_table.R
\name{format_table}
\alias{format_table}
\title{Dataframe and Tables Pretty Formatting}
\usage{
format_table(
x,
sep = " | ",
header = "-",
digits = 2,
protect_integers = TRUE,
missing = "",
width = NULL
)
}
\arguments{
\item{x}{A data frame.}
\item{sep}{Column separator.}
\item{header}{Header separator. Can be \code{NULL}.}
\item{digits}{Number of significant digits.}
\item{protect_integers}{Should integers be kept as integers (i.e., without decimals)?}
\item{missing}{Value by which \code{NA} values are replaced. By default, an empty string (i.e. \code{""}) is returned for \code{NA}.}
\item{width}{Minimum width of the returned string. If not \code{NULL} and \code{width} is larger than the string's length, leading whitespaces are added to the string.}
}
\value{
A data frame in character format.
}
\description{
Dataframe and Tables Pretty Formatting
}
\examples{
cat(format_table(iris))
cat(format_table(iris, sep = " ", header = "*", digits = 1))
}
insight/man/has_intercept.Rd 0000644 0001762 0000144 00000001305 13566471215 015622 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/has_intercept.R
\name{has_intercept}
\alias{has_intercept}
\title{Checks if model has an intercept}
\usage{
has_intercept(x)
}
\arguments{
\item{x}{A model object.}
}
\value{
\code{TRUE} if \code{x} has an intercept, \code{FALSE} otherwise.
}
\description{
Checks if model has an intercept.
}
\examples{
model <- lm(mpg ~ 0 + gear, data = mtcars)
has_intercept(model)
model <- lm(mpg ~ gear, data = mtcars)
has_intercept(model)
library(lme4)
model <- lmer(Reaction ~ 0 + Days + (Days | Subject), data = sleepstudy)
has_intercept(model)
model <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy)
has_intercept(model)
}
insight/man/download_model.Rd 0000644 0001762 0000144 00000001653 13566471215 015767 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/download_model.R
\name{download_model}
\alias{download_model}
\title{Download circus models}
\usage{
download_model(name, url = NULL)
}
\arguments{
\item{name}{Model name.}
\item{url}{String with the URL from where to download the model data.
Optional, and should only be used in case the repository-URL is
changing. By default, models are downloaded from
\code{https://raw.github.com/easystats/circus/master/data/}.}
}
\value{
A model from the \emph{circus}-repository.
}
\description{
Downloads pre-compiled models from the \emph{circus}-repository.
The \emph{circus}-repository contains a variety of fitted models to help
the systematic testing of other packages
}
\details{
The code that generated the model is available at the
\url{https://easystats.github.io/circus/reference/index.html}.
}
\references{
\url{https://easystats.github.io/circus/}
}
insight/man/is_multivariate.Rd 0000644 0001762 0000144 00000001740 13566471215 016176 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is_multivariate.R
\name{is_multivariate}
\alias{is_multivariate}
\title{Checks if an object stems from a multivariate response model}
\usage{
is_multivariate(x)
}
\arguments{
\item{x}{A model object, or an object returned by a function from this package.}
}
\value{
A logical, \code{TRUE} if either \code{x} is a model object and is
a multivariate response model, or \code{TRUE} if a return value from a
function of \pkg{insight} is from a multivariate response model.
}
\description{
Small helper that checks if a model is a multivariate response
model, i.e. a model with multiple outcomes.
}
\examples{
\dontrun{
library(rstanarm)
data("pbcLong")
model <- stan_mvmer(
formula = list(
logBili ~ year + (1 | id),
albumin ~ sex + year + (year | id)
),
data = pbcLong,
chains = 1, cores = 1, seed = 12345, iter = 1000
)
f <- find_formula(model)
is_multivariate(model)
is_multivariate(f)
}
}
insight/man/is_nullmodel.Rd 0000644 0001762 0000144 00000001415 13566471215 015462 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is_nullmodel.R
\name{is_nullmodel}
\alias{is_nullmodel}
\title{Checks if model is a null-model (intercept-only)}
\usage{
is_nullmodel(x)
}
\arguments{
\item{x}{A model object.}
}
\value{
\code{TRUE} if \code{x} is a null-model, \code{FALSE} otherwise.
}
\description{
Checks if model is a null-model (intercept-only), i.e. if
the conditional part of the model has no predictors.
}
\examples{
model <- lm(mpg ~ 1, data = mtcars)
is_nullmodel(model)
model <- lm(mpg ~ gear, data = mtcars)
is_nullmodel(model)
library(lme4)
model <- lmer(Reaction ~ 1 + (Days | Subject), data = sleepstudy)
is_nullmodel(model)
model <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy)
is_nullmodel(model)
}
insight/man/get_varcov.Rd 0000644 0001762 0000144 00000005110 13613301122 015105 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_varcov.R
\name{get_varcov}
\alias{get_varcov}
\alias{get_varcov.betareg}
\alias{get_varcov.DirichletRegModel}
\alias{get_varcov.clm2}
\alias{get_varcov.truncreg}
\alias{get_varcov.gamlss}
\alias{get_varcov.hurdle}
\alias{get_varcov.MixMod}
\alias{get_varcov.glmmTMB}
\alias{get_varcov.brmsfit}
\alias{get_varcov.mixor}
\title{Get variance-covariance matrix from models}
\usage{
get_varcov(x, ...)
\method{get_varcov}{betareg}(x, component = c("conditional", "precision", "all"), ...)
\method{get_varcov}{DirichletRegModel}(x, component = c("conditional", "precision", "all"), ...)
\method{get_varcov}{clm2}(x, component = c("all", "conditional", "scale"), ...)
\method{get_varcov}{truncreg}(x, component = c("conditional", "all"), ...)
\method{get_varcov}{gamlss}(x, component = c("conditional", "all"), ...)
\method{get_varcov}{hurdle}(x, component = c("conditional", "zero_inflated", "zi", "all"), ...)
\method{get_varcov}{MixMod}(x, component = c("conditional", "zero_inflated", "zi", "all"), ...)
\method{get_varcov}{glmmTMB}(x, component = c("conditional", "zero_inflated", "zi", "all"), ...)
\method{get_varcov}{brmsfit}(x, component = c("conditional", "zero_inflated", "zi", "all"), ...)
\method{get_varcov}{mixor}(x, effects = c("all", "fixed", "random"), ...)
}
\arguments{
\item{x}{A model.}
\item{...}{Currently not used.}
\item{component}{Should the complete variance-covariance matrix of the model
be returned, or only for specific model components only (like count or
zero-inflated model parts)? Applies to models with zero-inflated component,
or models with precision (e.g. \code{betareg}) component. \code{component}
may be one of \code{"conditional"}, \code{"zi"}, \code{"zero-inflated"},
\code{"precision"}, or \code{"all"}. May be abbreviated. Note that the
\emph{conditional} component is also called \emph{count} or \emph{mean}
component, depending on the model.}
\item{effects}{Should the complete variance-covariance matrix of the model
be returned, or only for specific model parameters only? Currently only
applies to models of class \code{mixor}.}
}
\value{
The variance-covariance matrix, as \code{matrix}-object.
}
\description{
Returns the variance-covariance, as retrieved by
\code{stats::vcov()}, but works for more model objects that probably
don't provide a \code{vcov()}-method.
}
\note{
\code{get_varcov()} tries to return the nearest positive definite matrix
in case of a negative variance-covariance matrix.
}
\examples{
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
get_varcov(m)
}
insight/man/format_ci.Rd 0000644 0001762 0000144 00000003133 13602361463 014730 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format_ci.R
\name{format_ci}
\alias{format_ci}
\title{Confidence/Credible Interval (CI) Formatting}
\usage{
format_ci(
CI_low,
CI_high,
ci = 0.95,
digits = 2,
brackets = TRUE,
width = NULL,
width_low = width,
width_high = width
)
}
\arguments{
\item{CI_low}{Lower CI bound.}
\item{CI_high}{Upper CI bound.}
\item{ci}{CI level in percentage.}
\item{digits}{Number of significant digits.}
\item{brackets}{Logical, if \code{TRUE} (default), values are encompassed in square brackets.}
\item{width}{Minimum width of the returned string. If not \code{NULL} and \code{width} is larger than the string's length, leading whitespaces are added to the string. If \code{width="auto"}, width will be set to the length of the longest string.}
\item{width_low, width_high}{Like \code{width}, but only applies to the lower or higher confidence interval value. This can be used when the values for the lower and upper CI are of very different length.}
}
\value{
A formatted string.
}
\description{
Confidence/Credible Interval (CI) Formatting
}
\examples{
format_ci(1.20, 3.57, ci = 0.90)
format_ci(1.20, 3.57, ci = NULL)
format_ci(1.20, 3.57, ci = NULL, brackets = FALSE)
format_ci(c(1.205645, 23.4), c(3.57, -1.35), ci = 0.90)
format_ci(c(1.20, NA, NA), c(3.57, -1.35, NA), ci = 0.90)
# automatic alignment of width, useful for printing multiple CIs in columns
x <- format_ci(c(1.205, 23.4, 100.43), c(3.57, -13.35, 9.4))
cat(x, sep = "\n")
x <- format_ci(c(1.205, 23.4, 100.43), c(3.57, -13.35, 9.4), width = "auto")
cat(x, sep = "\n")
}
insight/man/clean_parameters.Rd 0000644 0001762 0000144 00000004142 13566471215 016301 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clean_parameters.R
\name{clean_parameters}
\alias{clean_parameters}
\title{Get clean names of model parameters}
\usage{
clean_parameters(x, ...)
}
\arguments{
\item{x}{A fitted model.}
\item{...}{Currently not used.}
}
\value{
A data frame with "cleaned" parameter names and information on
effects, component and group where parameters belong to. To be consistent
across different models, the returned data frame always has at least four
columns \code{Parameter}, \code{Effects}, \code{Component} and
\code{Cleaned_Parameter}. See 'Details'.
}
\description{
This function "cleans" names of model parameters by removing
patterns like \code{"r_"} or \code{"b[]"} (mostly applicable to Stan models)
and adding columns with information to which group or component parameters
belong (i.e. fixed or random, count or zero-inflated...)
\cr \cr
The main purpose of this function is to easily filter and select model parameters,
in particular of - but not limited to - posterior samples from Stan models,
depending on certain characteristics. This might be useful when only selective
results should be reported or results from all parameters should be filtered
to return only certain results (see \code{\link{print_parameters}}).
}
\details{
The \code{Effects} column indicate if a parameter is a \emph{fixed}
or \emph{random} effect. The \code{Component} can either be \emph{conditional}
or \emph{zero_inflated}. For models with random effects, the \code{Group}
column indicates the grouping factor of the random effects. For multivariate
response models from \pkg{brms} or \pkg{rstanarm}, an additional \emph{Response}
column is included, to indicate which parameters belong to which response
formula. Furthermore, \emph{Cleaned_Parameter} column is returned that
contains "human readable" parameter names (which are mostly identical to
\code{Parameter}, except for for models from \pkg{brms} or \pkg{rstanarm},
or for specific terms like smooth- or spline-terms).
}
\examples{
\dontrun{
library(brms)
model <- download_model("brms_zi_2")
clean_parameters(model)
}
}
insight/man/print_parameters.Rd 0000644 0001762 0000144 00000007450 13566471215 016360 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_parameters.R
\name{print_parameters}
\alias{print_parameters}
\title{Prepare summary statistics of model parameters for printing}
\usage{
print_parameters(
x,
...,
split_by = c("Effects", "Component", "Group", "Response")
)
}
\arguments{
\item{x}{A fitted model, or a data frame returned by \code{\link{clean_parameters}}.}
\item{...}{One or more objects (data frames), which contain information about
the model parameters and related statistics (like confidence intervals, HDI,
ROPE, ...).}
\item{split_by}{\code{split_by} should be a character vector with one or
more of the following elements: \code{"Effects"}, \code{"Component"},
\code{"Response"} and \code{"Group"}. These are the column names returned
by \code{\link{clean_parameters}}, which is used to extract the information
from which the group or component model parameters belong. If \code{NULL}, the
merged data frame is returned. Else, the data frame is split into a list,
split by the values from those columns defined in \code{split_by}.}
}
\value{
A data frame or a list of data frames (if \code{split_by} is not \code{NULL}).
If a list is returned, the element names reflect the model components where the
extracted information in the data frames belong to, e.g. \code{`random.zero_inflated.Intercept: persons`}.
This is the data frame that contains the parameters for the random effects from
group-level "persons" from the zero-inflated model component.
}
\description{
This function takes a data frame, typically a data frame with
information on summaries of model parameters like \code{\link[bayestestR]{hdi}}
or \code{\link[bayestestR]{equivalence_test}}, as input and splits this information
into several parts, depending on the model. See details below.
}
\details{
This function prepares data frames that contain information
about model parameters for clear printing.
\cr \cr
First, \code{x} is required, which should either be a model object or a
prepared data frame as returned by \code{\link{clean_parameters}}. If
\code{x} is a model, \code{clean_parameters()} is called on that model
object to get information with which model components the parameters
are associated.
\cr \cr
Then, \code{...} take one or more data frames that also contain information
about parameters from the same model, but also have additional information
provided by other methods. For instance, a data frame in \code{...} might
be the result of \code{\link[bayestestR]{hdi}}, where we
have a) a \code{Parameters} column and b) columns with the HDI values.
\cr \cr
Now we have a data frame with model parameters and information about the
association to the different model components, a data frame with model
parameters, and some summary statistics. \code{print_parameters()}
then merges these data frames, so the statistic of interest (in our example:
the HDI) is also associated with the different model components. The data
frame is split into a list, so for a clear printing. Users can loop over this
list and print each component for a better overview. Further, parameter
names are "cleaned", if necessary, also for a cleaner print. See also 'Examples'.
}
\examples{
\dontrun{
library(bayestestR)
model <- download_model("brms_zi_2")
x <- hdi(model, effects = "all", component = "all")
# hdi() returns a data frame; here we use only the informaton on
# parameter names and HDI values
tmp <- as.data.frame(x)[, 1:4]
tmp
# Based on the "split_by" argument, we get a list of data frames that
# is split into several parts that reflect the model components.
print_parameters(model, tmp)
# This is the standard print()-method for "bayestestR::hdi"-objects.
# For printing methods, it is easy to print complex summary statistics
# in a clean way to the console by splitting the information into
# different model components.
x
}
}
insight/man/link_function.Rd 0000644 0001762 0000144 00000002375 13613301122 015622 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/link_function.R
\name{link_function}
\alias{link_function}
\alias{link_function.gamlss}
\alias{link_function.betareg}
\alias{link_function.DirichletRegModel}
\title{Get link-function from model object}
\usage{
link_function(x, ...)
\method{link_function}{gamlss}(x, what = c("mu", "sigma", "nu", "tau"), ...)
\method{link_function}{betareg}(x, what = c("mean", "precision"), ...)
\method{link_function}{DirichletRegModel}(x, what = c("mean", "precision"), ...)
}
\arguments{
\item{x}{A fitted model.}
\item{...}{Currently not used.}
\item{what}{For \code{gamlss} models, indicates for which distribution
parameter the link (inverse) function should be returned; for \code{betareg}
or \code{DirichletRegModel}, can be \code{"mean"} or \code{"precision"}.}
}
\value{
A function, describing the link-function from a model-object.
For multivariate-response models, a list of functions is returned.
}
\description{
Returns the link-function from a model object.
}
\examples{
# example from ?stats::glm
counts <- c(18, 17, 15, 20, 10, 20, 25, 13, 12)
outcome <- gl(3, 1, 9)
treatment <- gl(3, 3)
m <- glm(counts ~ outcome + treatment, family = poisson())
link_function(m)(.3)
# same as
log(.3)
}
insight/man/figures/ 0000755 0001762 0000144 00000000000 13446526427 014153 5 ustar ligges users insight/man/figures/logo.png 0000644 0001762 0000144 00000357205 13446526427 015635 0 ustar ligges users PNG
IHDR
[u` pHYs \F \FCA IDATx
U}dّb9&+
jȑ-U)IBt{7N ^.3+&Sfv(h&Lb%js"9;Рs}|?U
}ν{<ij jZcL1f;i' B *hbczgagMoV Pe] TWʂW J *ho5,_OcN^ Z
ZBƘ
K8