diff --git a/R/1_model_parameters.R b/R/1_model_parameters.R index 2a0980280..d74550842 100644 --- a/R/1_model_parameters.R +++ b/R/1_model_parameters.R @@ -41,10 +41,10 @@ #' the number of digits for the output. If `s_value = TRUE`, the p-value will #' be replaced by the S-value in the output (cf. _Rafi and Greenland 2020_). #' `pd` adds an additional column with the _probability of direction_ (see -#' [bayestestR::p_direction()] for details). `groups` can be used to group +#' [`bayestestR::p_direction()`] for details). `groups` can be used to group #' coefficients. It will be passed to the print-method, or can directly be used -#' in `print()`, see documentation in [print.parameters_model()]. Furthermore, -#' see 'Examples' in [model_parameters.default()]. For developers, whose +#' in `print()`, see documentation in [`print.parameters_model()`]. Furthermore, +#' see 'Examples' in [`model_parameters.default()`]. For developers, whose #' interest mainly is to get a "tidy" data frame of model summaries, it is #' recommended to set `pretty_names = FALSE` to speed up computation of the #' summary table. @@ -331,10 +331,11 @@ model_parameters <- function(model, ...) { parameters <- model_parameters -#' Parameters from (General) Linear Models +#' @title Parameters from (General) Linear Models +#' @name model_parameters.default #' -#' Extract and compute indices and measures to describe parameters of (general) -#' linear models (GLMs). +#' @description Extract and compute indices and measures to describe parameters +#' of (generalized) linear models (GLMs). #' #' @param model Model object. #' @param ci Confidence Interval (CI) level. Default to `0.95` (`95%`). @@ -407,14 +408,25 @@ parameters <- model_parameters #' `$Parameter` column of the parameters table to get the exact parameter #' names. #' @param ... Arguments passed to or from other methods. For instance, when -#' `bootstrap = TRUE`, arguments like `type` or `parallel` are -#' passed down to `bootstrap_model()`. +#' `bootstrap = TRUE`, arguments like `type` or `parallel` are passed down to +#' `bootstrap_model()`. Further non-documented arguments are `digits`, +#' `p_digits`, `ci_digits` and `footer_digits` to set the number of digits for +#' the output. If `s_value = TRUE`, the p-value will be replaced by the +#' S-value in the output (cf. _Rafi and Greenland 2020_). `pd` adds an +#' additional column with the _probability of direction_ (see +#' [`bayestestR::p_direction()`] for details). `groups` can be used to group +#' coefficients. It will be passed to the print-method, or can directly be +#' used in `print()`, see documentation in [`print.parameters_model()`]. +#' Furthermore, see 'Examples' for this function. For developers, whose +#' interest mainly is to get a "tidy" data frame of model summaries, it is +#' recommended to set `pretty_names = FALSE` to speed up computation of the +#' summary table. #' @param drop See `keep`. #' @param verbose Toggle warnings and messages. #' @inheritParams standard_error #' -#' @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 Confidence intervals and approximation of degrees of freedom #' @@ -441,6 +453,11 @@ parameters <- model_parameters #' # different p-value style in output #' model_parameters(model, p_digits = 5) #' model_parameters(model, digits = 3, ci_digits = 4, p_digits = "scientific") +#' +#' # report S-value or probability of direction for parameters +#' model_parameters(model, s_value = TRUE) +#' model_parameters(model, pd = TRUE) +#' #' \donttest{ #' # logistic regression model #' model <- glm(vs ~ wt + cyl, data = mtcars, family = "binomial") diff --git a/R/methods_lme4.R b/R/methods_lme4.R index 854edd29a..230b43832 100644 --- a/R/methods_lme4.R +++ b/R/methods_lme4.R @@ -33,8 +33,20 @@ #' intervals will be included. Set explicitly to `TRUE` or `FALSE` to enforce #' or omit calculation of confidence intervals. #' @param ... Arguments passed to or from other methods. For instance, when -#' `bootstrap = TRUE`, arguments like `type` or `parallel` are -#' passed down to `bootstrap_model()`. +#' `bootstrap = TRUE`, arguments like `type` or `parallel` are passed down to +#' `bootstrap_model()`. Further non-documented arguments are `digits`, +#' `p_digits`, `ci_digits` and `footer_digits` to set the number of digits for +#' the output. If `s_value = TRUE`, the p-value will be replaced by the +#' S-value in the output (cf. _Rafi and Greenland 2020_). `pd` adds an +#' additional column with the _probability of direction_ (see +#' [`bayestestR::p_direction()`] for details). `groups` can be used to group +#' coefficients. It will be passed to the print-method, or can directly be +#' used in `print()`, see documentation in [`print.parameters_model()`]. +#' Furthermore, see 'Examples' in [`model_parameters.default()`]. For +#' developers, whose interest mainly is to get a "tidy" data frame of model +#' summaries, it is recommended to set `pretty_names = FALSE` to speed up +#' computation of the summary table. +#' #' @inheritParams model_parameters.default #' @inheritParams model_parameters.stanreg #' diff --git a/man/model_parameters.averaging.Rd b/man/model_parameters.averaging.Rd index e15a8983d..5a001d7be 100644 --- a/man/model_parameters.averaging.Rd +++ b/man/model_parameters.averaging.Rd @@ -279,8 +279,19 @@ names.} \item{verbose}{Toggle warnings and messages.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' for this function. For developers, whose +interest mainly is to get a "tidy" data frame of model summaries, it is +recommended to set \code{pretty_names = FALSE} to speed up computation of the +summary table.} \item{include_studies}{Logical, if \code{TRUE} (default), includes parameters for all studies. Else, only parameters for overall-effects are shown.} diff --git a/man/model_parameters.cgam.Rd b/man/model_parameters.cgam.Rd index 2cfcad6c6..c2a4afa4b 100644 --- a/man/model_parameters.cgam.Rd +++ b/man/model_parameters.cgam.Rd @@ -140,8 +140,19 @@ names.} \item{verbose}{Toggle warnings and messages.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' for this function. For developers, whose +interest mainly is to get a "tidy" data frame of model summaries, it is +recommended to set \code{pretty_names = FALSE} to speed up computation of the +summary table.} \item{es_type}{The effect size of interest. Not that possibly not all effect sizes are applicable to the model object. See 'Details'. For Anova diff --git a/man/model_parameters.default.Rd b/man/model_parameters.default.Rd index dcf2dddfc..55fde59d6 100644 --- a/man/model_parameters.default.Rd +++ b/man/model_parameters.default.Rd @@ -176,15 +176,26 @@ or \strong{clubSandwich} packages. Please refer to their documentation (e.g., \code{?sandwich::vcovHAC}) to see the list of available arguments.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' for this function. For developers, whose +interest mainly is to get a "tidy" data frame of model summaries, it is +recommended to set \code{pretty_names = FALSE} to speed up computation of the +summary table.} } \value{ A data frame of indices related to the model's parameters. } \description{ -Extract and compute indices and measures to describe parameters of (general) -linear models (GLMs). +Extract and compute indices and measures to describe parameters +of (generalized) linear models (GLMs). } \section{Confidence intervals and approximation of degrees of freedom}{ @@ -376,6 +387,11 @@ model_parameters(model, # different p-value style in output model_parameters(model, p_digits = 5) model_parameters(model, digits = 3, ci_digits = 4, p_digits = "scientific") + +# report S-value or probability of direction for parameters +model_parameters(model, s_value = TRUE) +model_parameters(model, pd = TRUE) + \donttest{ # logistic regression model model <- glm(vs ~ wt + cyl, data = mtcars, family = "binomial") @@ -396,6 +412,6 @@ model_parameters(model) \dontshow{\}) # examplesIf} } \seealso{ -\code{\link[insight:standardize_names]{insight::standardize_names()}} to -rename columns into a consistent, standardized naming scheme. +\code{\link[insight:standardize_names]{insight::standardize_names()}} to rename columns into a +consistent, standardized naming scheme. } diff --git a/man/model_parameters.glht.Rd b/man/model_parameters.glht.Rd index 9ac52abde..b71244fd3 100644 --- a/man/model_parameters.glht.Rd +++ b/man/model_parameters.glht.Rd @@ -58,8 +58,19 @@ names.} \item{verbose}{Toggle warnings and messages.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' for this function. For developers, whose +interest mainly is to get a "tidy" data frame of model summaries, it is +recommended to set \code{pretty_names = FALSE} to speed up computation of the +summary table.} } \value{ A data frame of indices related to the model's parameters. diff --git a/man/model_parameters.htest.Rd b/man/model_parameters.htest.Rd index b0a069c49..3d83e29c7 100644 --- a/man/model_parameters.htest.Rd +++ b/man/model_parameters.htest.Rd @@ -46,8 +46,19 @@ models, can also be a character vector with multiple effect size names.} \item{verbose}{Toggle warnings and messages.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' for this function. For developers, whose +interest mainly is to get a "tidy" data frame of model summaries, it is +recommended to set \code{pretty_names = FALSE} to speed up computation of the +summary table.} \item{ci_method}{Method for computing degrees of freedom for confidence intervals (CI) and the related p-values. Allowed are following diff --git a/man/model_parameters.merMod.Rd b/man/model_parameters.merMod.Rd index 680b99992..52bb86415 100644 --- a/man/model_parameters.merMod.Rd +++ b/man/model_parameters.merMod.Rd @@ -289,8 +289,19 @@ names.} \item{verbose}{Toggle warnings and messages.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' in \code{\link[=model_parameters.default]{model_parameters.default()}}. For +developers, whose interest mainly is to get a "tidy" data frame of model +summaries, it is recommended to set \code{pretty_names = FALSE} to speed up +computation of the summary table.} \item{component}{Should all parameters, parameters for the conditional model, for the zero-inflation part of the model, or the dispersion model be returned? diff --git a/man/model_parameters.mlm.Rd b/man/model_parameters.mlm.Rd index bae5ce615..01dfb5acf 100644 --- a/man/model_parameters.mlm.Rd +++ b/man/model_parameters.mlm.Rd @@ -152,8 +152,19 @@ names.} \item{verbose}{Toggle warnings and messages.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' for this function. For developers, whose +interest mainly is to get a "tidy" data frame of model summaries, it is +recommended to set \code{pretty_names = FALSE} to speed up computation of the +summary table.} \item{summary}{Logical, if \code{TRUE}, prints summary information about the model (model formula, number of observations, residual standard deviation diff --git a/man/model_parameters.rma.Rd b/man/model_parameters.rma.Rd index 2d12431d8..e58a6844f 100644 --- a/man/model_parameters.rma.Rd +++ b/man/model_parameters.rma.Rd @@ -88,8 +88,19 @@ names.} \item{verbose}{Toggle warnings and messages.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' for this function. For developers, whose +interest mainly is to get a "tidy" data frame of model summaries, it is +recommended to set \code{pretty_names = FALSE} to speed up computation of the +summary table.} } \value{ A data frame of indices related to the model's parameters. diff --git a/man/model_parameters.zcpglm.Rd b/man/model_parameters.zcpglm.Rd index c277b50c3..bb91a300c 100644 --- a/man/model_parameters.zcpglm.Rd +++ b/man/model_parameters.zcpglm.Rd @@ -117,8 +117,19 @@ and more).} \item{verbose}{Toggle warnings and messages.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' for this function. For developers, whose +interest mainly is to get a "tidy" data frame of model summaries, it is +recommended to set \code{pretty_names = FALSE} to speed up computation of the +summary table.} } \value{ A data frame of indices related to the model's parameters. diff --git a/man/n_clusters.Rd b/man/n_clusters.Rd index 444d06ad7..13b385a05 100644 --- a/man/n_clusters.Rd +++ b/man/n_clusters.Rd @@ -94,8 +94,19 @@ as \code{method}).} \item{n_max}{Maximal number of clusters to test.} \item{...}{Arguments passed to or from other methods. For instance, when -\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are -passed down to \code{bootstrap_model()}.} +\code{bootstrap = TRUE}, arguments like \code{type} or \code{parallel} are passed down to +\code{bootstrap_model()}. Further non-documented arguments are \code{digits}, +\code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of digits for +the output. If \code{s_value = TRUE}, the p-value will be replaced by the +S-value in the output (cf. \emph{Rafi and Greenland 2020}). \code{pd} adds an +additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group +coefficients. It will be passed to the print-method, or can directly be +used in \code{print()}, see documentation in \code{\link[=print.parameters_model]{print.parameters_model()}}. +Furthermore, see 'Examples' for this function. For developers, whose +interest mainly is to get a "tidy" data frame of model summaries, it is +recommended to set \code{pretty_names = FALSE} to speed up computation of the +summary table.} \item{clustering_function, gap_method}{Other arguments passed to other functions. \code{clustering_function} is used by \code{fviz_nbclust()} and