Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Nov 19, 2024
1 parent 8ac43e0 commit d3ca9a2
Show file tree
Hide file tree
Showing 16 changed files with 232 additions and 181 deletions.
5 changes: 3 additions & 2 deletions R/1_model_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
#' - [Default method][model_parameters.default()]: `lm`, `glm`, **stats**, **censReg**,
#' **MASS**, **survey**, ...
#' - [Additive models][model_parameters.cgam()]: **bamlss**, **gamlss**, **mgcv**,
#' **scam**, **VGAM**, `Gam`, `gamm`, ...
#' - [ANOVA][model_parameters.aov()]: **afex**, `aov`, `anova`, ...
#' **scam**, **VGAM**, `Gam` (although the output of `Gam` is more Anova-alike),
#' `gamm`, ...
#' - [ANOVA][model_parameters.aov()]: **afex**, `aov`, `anova`, `Gam`, ...
#' - [Bayesian][model_parameters.stanreg()]: **BayesFactor**, **blavaan**, **brms**,
#' **MCMCglmm**, **posterior**, **rstanarm**, `bayesQR`, `bcplm`, `BGGM`, `blmrm`,
#' `blrm`, `mcmc.list`, `MCMCglmm`, ...
Expand Down
1 change: 0 additions & 1 deletion R/methods_MCMCglmm.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ p_value.MCMCglmm <- function(model, ...) {
}


#' @rdname model_parameters.stanreg
#' @export
model_parameters.MCMCglmm <- function(model,
centrality = "median",
Expand Down
21 changes: 13 additions & 8 deletions R/methods_aod.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,28 @@

#################### .glimML ------

#' Parameters from special models
#' @title Parameters from special models
#' @name model_parameters.glimML
#'
#' Parameters from special regression models not listed under one of the previous categories yet.
#' @description
#' Parameters from special regression models not listed under one of the
#' previous categories yet.
#'
#' @param component Model component for which parameters should be shown. May be
#' one of `"conditional"`, `"precision"` (**betareg**),
#' `"scale"` (**ordinal**), `"extra"` (**glmx**),
#' `"marginal"` (**mfx**), `"conditional"` or `"full"` (for
#' `MuMIn::model.avg()`) or `"all"`.
#' one of `"conditional"`, `"precision"` (e.g. **betareg**), `"scale"` (e.g.
#' **ordinal**), `"extra"` (e.g. **glmx**), `"marginal"` (e.g. **mfx**),
#' `"conditional"` or `"full"` (for `MuMIn::model.avg()`) or `"all"`. See section
#' _Model components_ for an overview of possible options for `component`.
#' @param include_studies Logical, if `TRUE` (default), includes parameters
#' for all studies. Else, only parameters for overall-effects are shown.
#' @inheritParams model_parameters.default
#' @inheritParams model_parameters.stanreg
#' @inheritParams simulate_model
#'
#' @seealso [insight::standardize_names()] to rename
#' columns into a consistent, standardized naming scheme.
#' @seealso [insight::standardize_names()] to rename columns into a consistent,
#' standardized naming scheme.
#'
#' @inheritSection model_parameters.zcpglm Model components
#'
#' @examples
#' library(parameters)
Expand Down
1 change: 0 additions & 1 deletion R/methods_base.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#' @rdname model_parameters.stanreg
#' @export
model_parameters.data.frame <- function(model,
as_draws = FALSE,
Expand Down
15 changes: 10 additions & 5 deletions R/methods_brms.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#' @rdname model_parameters.stanreg
#' @inheritParams insight::get_parameters
#' @export
model_parameters.brmsfit <- function(model,
Expand Down Expand Up @@ -209,11 +208,17 @@ model_parameters.brmsfit <- function(model,

#' @export
standard_error.brmsfit <- function(model,
effects = c("fixed", "random"),
component = c("all", "conditional", "zi", "zero_inflated"),
effects = "fixed",
component = "all",
...) {
effects <- match.arg(effects)
component <- match.arg(component)
effects <- insight::validate_argument(
effects,
c("fixed", "random")
)
component <- insight::validate_argument(
component,
c("all", "conditional", "zi", "zero_inflated")
)

params <- insight::get_parameters(model, effects = effects, component = component, ...)

Expand Down
6 changes: 3 additions & 3 deletions R/methods_cplm.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
#' - **clm2**: `"scale"`
#' - **selection**: `"selection"`, `"outcome"`, and `"auxiliary"`
#'
#' For models of class `brmsfit` (package **brms**), `component`, even more
#' options are possible for the `component` argument, which are not all
#' documented in detail here.
#' For models of class `brmsfit` (package **brms**), even more options are
#' possible for the `component` argument, which are not all documented in detail
#' here.
#'
#' @examples
#' library(parameters)
Expand Down
1 change: 0 additions & 1 deletion R/methods_posterior.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#' @rdname model_parameters.stanreg
#' @export
model_parameters.draws <- function(model,
centrality = "median",
Expand Down
20 changes: 11 additions & 9 deletions R/methods_rstanarm.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@
#' @inheritParams bayestestR::describe_posterior
#' @inheritParams insight::get_parameters
#'
#' @seealso [insight::standardize_names()] to
#' rename columns into a consistent, standardized naming scheme.
#' @seealso [insight::standardize_names()] to rename columns into a consistent,
#' standardized naming scheme.
#'
#' @note When `standardize = "refit"`, columns `diagnostic`,
#' `bf_prior` and `priors` refer to the *original*
#' `model`. If `model` is a data frame, arguments `diagnostic`,
#' `bf_prior` and `priors` are ignored. \cr \cr There is also a
#' [`plot()`-method](https://easystats.github.io/see/articles/parameters.html)
#' implemented in the
#' [**see**-package](https://easystats.github.io/see/).
#' @note When `standardize = "refit"`, columns `diagnostic`, `bf_prior` and
#' `priors` refer to the *original* `model`. If `model` is a data frame,
#' arguments `diagnostic`, `bf_prior` and `priors` are ignored.
#'
#' There is also a
#' [`plot()`-method](https://easystats.github.io/see/articles/parameters.html)
#' implemented in the [**see**-package](https://easystats.github.io/see/).
#'
#' @inheritSection model_parameters Confidence intervals and approximation of degrees of freedom
#'
#' @inheritSection model_parameters.zcpglm Model components
#'
#' @examples
#' \donttest{
#' library(parameters)
Expand Down
2 changes: 1 addition & 1 deletion R/utils_model_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
not_allowed_string <- datawizard::text_concatenate(not_allowed, enclose = "\"")
insight::format_alert(
sprintf("Following arguments are not supported in `%s()` for models of class `%s` and will be ignored: %s", function_name, model_class, not_allowed_string), # nolint
sprintf("Please run `%s()` again without specifying the above mentioned arguments to obtain expected results.", function_name) # nolint
sprintf("In case you obtain expected results, please run `%s()` again without specifying the above mentioned arguments.", function_name) # nolint
)
}
dots[not_allowed] <- NULL
Expand Down
5 changes: 3 additions & 2 deletions man/model_parameters.Rd

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

59 changes: 52 additions & 7 deletions man/model_parameters.glimML.Rd

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

6 changes: 3 additions & 3 deletions man/model_parameters.glmmTMB.Rd

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

6 changes: 3 additions & 3 deletions man/model_parameters.mlm.Rd

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

Loading

0 comments on commit d3ca9a2

Please sign in to comment.