Skip to content

Commit

Permalink
remove degrees_of_freedom methods (#998)
Browse files Browse the repository at this point in the history
* remove degrees_of_freedom methods

* version

* lintr

* fix

* news

* docs
  • Loading branch information
strengejacke authored Jul 23, 2024
1 parent 6fd69e7 commit 5b8e7a8
Show file tree
Hide file tree
Showing 47 changed files with 146 additions and 902 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: parameters
Title: Processing of Model Parameters
Version: 0.22.1.4
Version: 0.22.1.6
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down
56 changes: 0 additions & 56 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -118,62 +118,6 @@ S3method(convert_efa_to_cfa,fa)
S3method(convert_efa_to_cfa,fa.ci)
S3method(convert_efa_to_cfa,parameters_efa)
S3method(convert_efa_to_cfa,parameters_pca)
S3method(degrees_of_freedom,BBmm)
S3method(degrees_of_freedom,BBreg)
S3method(degrees_of_freedom,betamfx)
S3method(degrees_of_freedom,betaor)
S3method(degrees_of_freedom,bfsl)
S3method(degrees_of_freedom,bigglm)
S3method(degrees_of_freedom,biglm)
S3method(degrees_of_freedom,cgam)
S3method(degrees_of_freedom,cgamm)
S3method(degrees_of_freedom,coeftest)
S3method(degrees_of_freedom,complmrob)
S3method(degrees_of_freedom,default)
S3method(degrees_of_freedom,emmGrid)
S3method(degrees_of_freedom,emm_list)
S3method(degrees_of_freedom,fixest)
S3method(degrees_of_freedom,fixest_multi)
S3method(degrees_of_freedom,garch)
S3method(degrees_of_freedom,glht)
S3method(degrees_of_freedom,gls)
S3method(degrees_of_freedom,hglm)
S3method(degrees_of_freedom,ivFixed)
S3method(degrees_of_freedom,ivprobit)
S3method(degrees_of_freedom,logitmfx)
S3method(degrees_of_freedom,logitor)
S3method(degrees_of_freedom,lqm)
S3method(degrees_of_freedom,lqmm)
S3method(degrees_of_freedom,mediate)
S3method(degrees_of_freedom,merModList)
S3method(degrees_of_freedom,mhurdle)
S3method(degrees_of_freedom,mipo)
S3method(degrees_of_freedom,mira)
S3method(degrees_of_freedom,mmrm)
S3method(degrees_of_freedom,mmrm_fit)
S3method(degrees_of_freedom,mmrm_tmb)
S3method(degrees_of_freedom,model_fit)
S3method(degrees_of_freedom,multinom)
S3method(degrees_of_freedom,negbinirr)
S3method(degrees_of_freedom,negbinmfx)
S3method(degrees_of_freedom,nestedLogit)
S3method(degrees_of_freedom,nlrq)
S3method(degrees_of_freedom,nnet)
S3method(degrees_of_freedom,plm)
S3method(degrees_of_freedom,poissonirr)
S3method(degrees_of_freedom,poissonmfx)
S3method(degrees_of_freedom,probitmfx)
S3method(degrees_of_freedom,rlm)
S3method(degrees_of_freedom,rq)
S3method(degrees_of_freedom,rqs)
S3method(degrees_of_freedom,rqss)
S3method(degrees_of_freedom,selection)
S3method(degrees_of_freedom,serp)
S3method(degrees_of_freedom,summary.lm)
S3method(degrees_of_freedom,svy2lme)
S3method(degrees_of_freedom,systemfit)
S3method(degrees_of_freedom,truncreg)
S3method(degrees_of_freedom,vgam)
S3method(display,compare_parameters)
S3method(display,equivalence_test_lm)
S3method(display,parameters_brms_meta)
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# parameters 0.22.2

## Changes

* Methods for `degrees_of_freedom()` have been removed. `degrees_of_freedom()`
now calls `insight::get_df()`.

# parameters 0.22.1

## Breaking changes
Expand Down
16 changes: 16 additions & 0 deletions R/compare_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,19 @@ compare_models <- compare_parameters

x
}


.is_bayesian_model <- function(x, exclude = NULL) {
bayes_classes <- c(
"brmsfit", "stanfit", "MCMCglmm", "stanreg",
"stanmvreg", "bmerMod", "BFBayesFactor", "bamlss",
"bayesx", "mcmc", "bcplm", "bayesQR", "BGGM",
"meta_random", "meta_fixed", "meta_bma", "blavaan",
"blrm", "blmerMod"
)
# if exclude is not NULL, remove elements in exclude from bayes_class
if (!is.null(exclude)) {
bayes_classes <- bayes_classes[!bayes_classes %in% exclude]
}
inherits(x, bayes_classes)
}
Loading

0 comments on commit 5b8e7a8

Please sign in to comment.