Skip to content

Commit

Permalink
equi_test, extract_params
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 23, 2024
1 parent c2d07e6 commit 9e6eed1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/equivalence_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ equivalence_test.ggeffects <- function(x,
params <- insight::get_parameters(model)

# degrees of freedom
dof <- degrees_of_freedom(model, method = "any")
dof <- insight::get_df(x = model, type = "residual")

# mu
params$mu <- params$Estimate * -1
Expand Down
6 changes: 3 additions & 3 deletions R/extract_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@
# ==== degrees of freedom

if (is.null(ci_method)) {
df_error <- degrees_of_freedom(model, method = "any", verbose = FALSE)
df_error <- insight::get_df(x = model, type = "residual", verbose = FALSE)
} else {
df_error <- degrees_of_freedom(model, method = ci_method, verbose = FALSE)
df_error <- insight::get_df(x = model, type = ci_method, verbose = FALSE)
}
if (!is.null(df_error) && (length(df_error) == 1 || length(df_error) == nrow(parameters))) {
if (length(df_error) == 1) {
Expand Down Expand Up @@ -565,7 +565,7 @@
if (!ci_method %in% special_ci_methods) {
df_error <- data.frame(
Parameter = parameters$Parameter,
df_error = degrees_of_freedom(model, method = "any"),
df_error = insight::get_df(x = model, type = "residual"),
stringsAsFactors = FALSE
)
}
Expand Down

0 comments on commit 9e6eed1

Please sign in to comment.