Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Nov 7, 2024
1 parent 0cee673 commit 37b4135
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 8 deletions.
15 changes: 12 additions & 3 deletions R/find_parameters_mixed.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
#' are fixed or random effects - depending on the `effects` argument -
#' but no auxiliary parameters). For `component = "distributional"` (or
#' `"auxiliary"`), components like `sigma` or `dispersion` (and
#' other auxiliary parameters) are returned.
#' other auxiliary parameters) are returned. See section _Model Component_
#' for details.
#' @param ... Currently not used.
#' @inheritParams find_parameters
#' @inheritParams find_parameters.betamfx
#' @inheritParams find_parameters.BGGM
#' @inheritParams find_predictors
#'
#' @inheritSection find_predictors Model components
#'
#' @return A list of parameter names. The returned list may have following
#' elements, usually returned based on the combination of the `effects` and
#' `component` arguments:
Expand All @@ -47,7 +50,10 @@
#' @export
find_parameters.glmmTMB <- function(x, effects = "all", component = "all", flatten = FALSE, ...) {
effects <- validate_argument(effects, c("all", "fixed", "random"))
component <- validate_argument(component, c("all", "conditional", "zi", "zero_inflated", "dispersion"))
component <- validate_argument(
component,
c("all", "conditional", "zi", "zero_inflated", "dispersion", "location", "distributional", "auxiliary")
)

# installed
check_if_installed("lme4")
Expand Down Expand Up @@ -151,7 +157,10 @@ find_parameters.nlmerMod <- function(x, effects = "all", component = "all", flat
#' @export
find_parameters.hglm <- function(x, effects = "all", component = "all", flatten = FALSE, ...) {
effects <- validate_argument(effects, c("all", "fixed", "random"))
component <- validate_argument(component, c("all", "conditional", "dispersion"))
component <- validate_argument(
component,
c("all", "conditional", "dispersion", "location", "distributional", "auxiliary")
)

fe <- x$fixef
re <- x$ranef
Expand Down
9 changes: 6 additions & 3 deletions R/get_parameters_mixed.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ get_parameters.glmmTMB <- function(x, effects = "fixed", component = "all", ...)
effects <- validate_argument(effects, c("fixed", "random"))
component <- validate_argument(
component,
c("all", "conditional", "zi", "zero_inflated", "dispersion")
c("all", "conditional", "zi", "zero_inflated", "dispersion", "location", "distributional", "auxiliary") # nolint
)

if (effects == "fixed") {
Expand Down Expand Up @@ -458,7 +458,7 @@ get_parameters.MixMod <- function(x, effects = "fixed", component = "all", ...)
effects <- validate_argument(effects, c("fixed", "random"))
component <- validate_argument(
component,
c("all", "conditional", "zi", "zero_inflated", "dispersion")
c("all", "conditional", "zi", "zero_inflated", "dispersion", "location", "distributional", "auxiliary") # nolint
)

has_zeroinf <- !is.null(find_formula(x, verbose = FALSE)[["zero_inflated"]])
Expand Down Expand Up @@ -527,7 +527,10 @@ get_parameters.MixMod <- function(x, effects = "fixed", component = "all", ...)
#' @export
get_parameters.hglm <- function(x, effects = "fixed", component = "all", ...) {
effects <- validate_argument(effects, c("fixed", "random"))
component <- validate_argument(component, c("all", "conditional", "dispersion"))
component <- validate_argument(
component,
c("all", "conditional", "dispersion", "location", "distributional", "auxiliary")
)

fe <- x$fixef
re <- x$ranef
Expand Down
44 changes: 43 additions & 1 deletion man/find_parameters.glmmTMB.Rd

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

3 changes: 2 additions & 1 deletion man/get_parameters.glmmTMB.Rd

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

0 comments on commit 37b4135

Please sign in to comment.