Skip to content

Commit

Permalink
if needed, for gam
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 22, 2024
1 parent f49487f commit 869a304
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions R/get_df_residual.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,18 @@

dof
}


# helper ----------------------

.dof_fit_gam <- function(model, dof) {
params <- find_parameters(model)
if (!is.null(params$conditional)) {
dof <- rep(dof, length(params$conditional))
}
if (!is.null(params$smooth_terms)) {
s <- summary(model)
dof <- c(dof, s$s.table[, "Ref.df"])
}
dof
}

0 comments on commit 869a304

Please sign in to comment.