Skip to content

Commit

Permalink
try...
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 23, 2024
1 parent 225e1d4 commit 1b40884
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/extract_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@

# Degrees of freedom
if (.dof_method_ok(model, ci_method)) {
dof <- degrees_of_freedom(model, method = ci_method, verbose = FALSE)
dof <- insight::get_df(x = model, type = ci_method, verbose = FALSE)
} else {
dof <- Inf
}
Expand Down
2 changes: 1 addition & 1 deletion R/methods_flexsurvreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ p_value.flexsurvreg <- function(model, ...) {
params <- insight::get_parameters(model)
est <- params$Estimate
se <- standard_error(model)$SE
p <- 2 * stats::pt(abs(est / se), df = degrees_of_freedom(model, method = "any"), lower.tail = FALSE)
p <- 2 * stats::pt(abs(est / se), df = insight::get_df(x = model, type = "wald"), lower.tail = FALSE)
.data_frame(
Parameter = params$Parameter,
p = as.vector(p)
Expand Down
4 changes: 2 additions & 2 deletions R/methods_gee.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ p_value.gee <- function(model, method = NULL, ...) {
if (isTRUE(list(...)$robust) || "vcov" %in% names(list(...))) {
p <- 2 * stats::pt(
abs(cs[, "Estimate"] / cs[, "Robust S.E."]),
df = degrees_of_freedom(model, method = method),
df = insight::get_df(x = model, type = method),
lower.tail = FALSE
)
} else {
p <- 2 * stats::pt(
abs(cs[, "Estimate"] / cs[, "Naive S.E."]),
df = degrees_of_freedom(model, method = method),
df = insight::get_df(x = model, type = method),
lower.tail = FALSE
)
}
Expand Down
2 changes: 1 addition & 1 deletion R/methods_glmgee.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ p_value.glmgee <- function(model,

p <- 2 * stats::pt(
abs(est$Estimate / se$SE),
df = degrees_of_freedom(model, method = method),
df = insight::get_df(x = model, type = method),
lower.tail = FALSE
)

Expand Down
2 changes: 1 addition & 1 deletion R/methods_lm.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ p_value.summary.lm <- function(model, ...) {

#' @export
ci.summary.lm <- function(x, ci = 0.95, method = "residual", ...) {
.ci_generic(model = x, ci = ci, method = method, dof = degrees_of_freedom(x), ...)
.ci_generic(model = x, ci = ci, method = method, dof = insight::get_df(x), ...)
}


Expand Down

0 comments on commit 1b40884

Please sign in to comment.