Skip to content

Commit

Permalink
expand documentation for conditional_values()
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinsimpson committed Nov 25, 2024
1 parent fc6c951 commit 3556614
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
15 changes: 13 additions & 2 deletions R/conditional-values.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#' Generated predicted values from a GAM, conditional upon supplied values of
#' covariates
#' Conditional predictions from a GAM
#'
#' Generate predicted values from a GAM, conditional upon supplied values of
#' covariates. [conditional_values()] is modelled after
#' [marginaleffects::plot_predictions()], but with an intentionally simpler,
#' more restrictive functionality. The intended use case is for quickly
#' visualizing predicted values from a fitted GAM on the response scale. For
#' more complex model predictions, you are strongly encouraged to use
#' [marginaleffects::plot_predictions()].
#'
#' @param model a fitted GAM object.
#' @param condition either a character vector or a list supplying the names of
Expand All @@ -19,6 +26,10 @@
#' credible intervals.
#' @param ... arguments passed to [fitted_values()].
#'
#' @author Gavin L. Simpson
#'
#' @return A data frame (tibble) of class `"conditional_values"`.
#'
#' @export
#'
#' @examples
Expand Down
18 changes: 14 additions & 4 deletions man/conditional_values.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3556614

Please sign in to comment.