Skip to content

Commit

Permalink
CRAN submission (#818)
Browse files Browse the repository at this point in the history
* plan release

* fix test

* cran comments [skip ci]

* lintr

* submit

* submitted

* RD syntax

* submitted, 2nd attempt
  • Loading branch information
strengejacke authored Oct 12, 2023
1 parent 89b7798 commit 95ebd50
Show file tree
Hide file tree
Showing 48 changed files with 150 additions and 140 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.19.5
Date: 2023-09-13 07:09:16 UTC
SHA: 3ebd4e597e7a67ee0ed14bff617c5889b01767bb
Version: 0.19.6
Date: 2023-10-12 10:36:43 UTC
SHA: f2fbc4f7b48031b6359e0b815389c989cbf2976f
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: insight
Title: Easy Access to Model Information for Various Model Objects
Version: 0.19.5.12
Version: 0.19.6
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down
6 changes: 3 additions & 3 deletions R/clean_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
#' The `Effects` column indicate if a parameter is a *fixed* or *random* effect.
#' The `Component` can either be *conditional* or *zero_inflated*. For models
#' with random effects, the `Group` column indicates the grouping factor of the
#' random effects. For multivariate response models from {brms} or
#' {rstanarm}, an additional *Response* column is included, to indicate
#' random effects. For multivariate response models from **brms** or
#' **rstanarm**, an additional *Response* column is included, to indicate
#' which parameters belong to which response formula. Furthermore,
#' *Cleaned_Parameter* column is returned that contains "human readable"
#' parameter names (which are mostly identical to `Parameter`, except for for
#' models from {brms} or {rstanarm}, or for specific terms like smooth-
#' models from **brms** or **rstanarm**, or for specific terms like smooth-
#' or spline-terms).
#'
#' @examplesIf require("curl", quietly = TRUE) && curl::has_internet() && require("brms")
Expand Down
4 changes: 2 additions & 2 deletions R/find_formula.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' - `conditional`, the "fixed effects" part from the model (in the
#' context of fixed-effects or instrumental variable regression, also
#' called *regressors*) . One exception are `DirichletRegModel` models
#' from {DirichletReg}, which has two or three components,
#' from **DirichletReg**, which has two or three components,
#' depending on `model`.
#'
#' - `random`, the "random effects" part from the model (or the
Expand Down Expand Up @@ -49,7 +49,7 @@
#' `feisr::feis()`, the formula for the slope parameters
#'
#' - `precision`, for `DirichletRegModel` models from
#' {DirichletReg}, when parametrization (i.e. `model`) is
#' **DirichletReg**, when parametrization (i.e. `model`) is
#' `"alternative"`.
#'
#' @note For models of class `lme` or `gls` the correlation-component
Expand Down
14 changes: 7 additions & 7 deletions R/find_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#' names equal the column names of the posterior samples after coercion
#' from `as.data.frame()`. See the documentation for your object's class:
#'
#' - [Bayesian models][find_parameters.BGGM] ({rstanarm}, {brms}, {MCMCglmm}, ...)
#' - [Generalized additive models][find_parameters.gamlss] ({mgcv}, {VGAM}, ...)
#' - [Marginal effects models][find_parameters.betamfx] ({mfx})
#' - [Estimated marginal means][find_parameters.emmGrid] ({emmeans})
#' - [Mixed models][find_parameters.glmmTMB] ({lme4}, {glmmTMB}, {GLMMadaptive}, ...)
#' - [Zero-inflated and hurdle models][find_parameters.zeroinfl] ({pscl}, ...)
#' - [Models with special components][find_parameters.averaging] ({betareg}, {MuMIn}, ...)
#' - [Bayesian models][find_parameters.BGGM] (**rstanarm**, **brms**, **MCMCglmm**, ...)
#' - [Generalized additive models][find_parameters.gamlss] (**mgcv**, **VGAM**, ...)
#' - [Marginal effects models][find_parameters.betamfx] (**mfx**)
#' - [Estimated marginal means][find_parameters.emmGrid] (**emmeans**)
#' - [Mixed models][find_parameters.glmmTMB] (**lme4**, **glmmTMB**, **GLMMadaptive**, ...)
#' - [Zero-inflated and hurdle models][find_parameters.zeroinfl] (**pscl**, ...)
#' - [Models with special components][find_parameters.averaging] (**betareg**, **MuMIn**, ...)
#'
#' @param verbose Toggle messages and warnings.
#' @param ... Currently not used.
Expand Down
8 changes: 4 additions & 4 deletions R/find_parameters_bayesian.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
#' component of the model
#' - `smooth_terms`, the smooth parameters
#'
#' Furthermore, some models, especially from {brms}, can also return auxiliary
#' Furthermore, some models, especially from **brms**, can also return auxiliary
#' parameters. These may be one of the following:
#'
#' - `sigma`, the residual standard deviation (auxiliary parameter)
#' - `dispersion`, the dispersion parameters (auxiliary parameter)
#' - `beta`, the beta parameter (auxiliary parameter)
#' - `simplex`, simplex parameters of monotonic effects (\pkg{brms} only)
#' - `mix`, mixture parameters (\pkg{brms} only)
#' - `shiftprop`, shifted proportion parameters (\pkg{brms} only)
#' - `simplex`, simplex parameters of monotonic effects (**brms** only)
#' - `mix`, mixture parameters (**brms** only)
#' - `shiftprop`, shifted proportion parameters (**brms** only)
#'
#' @examples
#' data(mtcars)
Expand Down
2 changes: 1 addition & 1 deletion R/find_parameters_mfx.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' term, the instrumental variables or marginal effects be returned? Applies
#' to models with zero-inflated and/or dispersion formula, or to models with
#' instrumental variables (so called fixed-effects regressions), or models
#' with marginal effects from \pkg{mfx}. May be abbreviated. Note that the
#' with marginal effects from **mfx**. May be abbreviated. Note that the
#' *conditional* component is also called *count* or *mean*
#' component, depending on the model. There are three convenient shortcuts:
#' `component = "all"` returns all possible parameters.
Expand Down
2 changes: 1 addition & 1 deletion R/format_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' converts all columns into character vectors!
#'
#' @param x A data frame of model's parameters, as returned by various functions
#' of the {easystats}-packages. May also be a result from
#' of the **easystats**-packages. May also be a result from
#' `broom::tidy()`.
#' @param pretty_names Return "pretty" (i.e. more human readable) parameter
#' names.
Expand Down
2 changes: 1 addition & 1 deletion R/get_auxiliary.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' degrees of freedom. For models of class `glmmTMB`, dispersion is
#' \ifelse{html}{\out{&sigma;<sup>2</sup>}}{\eqn{\sigma^2}}.
#' }
#' \subsection{\pkg{brms} models}{
#' \subsection{**brms** models}{
#' For models of class `brmsfit`, there are different options for the
#' `type` argument. See a list of supported auxiliary parameters here:
#' [find_parameters.BGGM()].
Expand Down
2 changes: 1 addition & 1 deletion R/get_loglikelihood.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' @return An object of class `"logLik"`, also containing the
#' log-likelihoods for each observation as a `per_observation` attribute
#' (`attributes(get_loglikelihood(x))$per_observation`) when possible.
#' The code was partly inspired from the {nonnest2} package.
#' The code was partly inspired from the **nonnest2** package.
#'
#' @examples
#' x <- lm(Sepal.Length ~ Petal.Width + Species, data = iris)
Expand Down
14 changes: 7 additions & 7 deletions R/get_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#' @description Returns the coefficients (or posterior samples for Bayesian
#' models) from a model. See the documentation for your object's class:
#'
#' - [Bayesian models][get_parameters.BGGM] ({rstanarm}, {brms}, {MCMCglmm}, ...)
#' - [Estimated marginal means][get_parameters.emmGrid] ({emmeans})
#' - [Generalized additive models][get_parameters.gamm] ({mgcv}, {VGAM}, ...)
#' - [Marginal effects models][get_parameters.betamfx] ({mfx})
#' - [Mixed models][get_parameters.glmm] ({lme4}, {glmmTMB}, {GLMMadaptive}, ...)
#' - [Zero-inflated and hurdle models][get_parameters.zeroinfl] ({pscl}, ...)
#' - [Models with special components][get_parameters.betareg] ({betareg}, {MuMIn}, ...)
#' - [Bayesian models][get_parameters.BGGM] (**rstanarm**, **brms**, **MCMCglmm**, ...)
#' - [Estimated marginal means][get_parameters.emmGrid] (**emmeans**)
#' - [Generalized additive models][get_parameters.gamm] (**mgcv**, **VGAM**, ...)
#' - [Marginal effects models][get_parameters.betamfx] (**mfx**)
#' - [Mixed models][get_parameters.glmm] (**lme4**, **glmmTMB**, **GLMMadaptive**, ...)
#' - [Zero-inflated and hurdle models][get_parameters.zeroinfl] (**pscl**, ...)
#' - [Models with special components][get_parameters.betareg] (**betareg**, **MuMIn**, ...)
#' - [Hypothesis tests][get_parameters.htest] (`htest`)
#'
#' @param verbose Toggle messages and warnings.
Expand Down
4 changes: 2 additions & 2 deletions R/get_parameters_bayesian.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#' `effects` and `component` can be used.
#'
#' @section BFBayesFactor Models:
#' Note that for `BFBayesFactor` models (from the \pkg{BayesFactor}
#' package), posteriors are only extracted from the first numerator model (i.e.,
#' Note that for `BFBayesFactor` models (from the **BayesFactor** package),
#' posteriors are only extracted from the first numerator model (i.e.,
#' `model[1]`). If you want to apply some function `foo()` to another
#' model stored in the `BFBayesFactor` object, index it directly, e.g.
#' `foo(model[2])`, `foo(1/model[5])`, etc.
Expand Down
2 changes: 1 addition & 1 deletion R/get_parameters_emmeans.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#'
#' @note
#' Note that `emmGrid` or `emm_list` objects returned by functions from
#' {emmeans} have a different structure compared to usual regression models.
#' **emmeans** have a different structure compared to usual regression models.
#' Hence, the `Parameter` column does not always contain names of *variables*,
#' but may rather contain *values*, e.g. for contrasts. See an example for
#' pairwise comparisons below.
Expand Down
2 changes: 1 addition & 1 deletion R/get_parameters_mixed.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' parameter names and the related point estimates. If `effects =
#' "random"`, a list of data frames with the random effects (as returned by
#' `ranef()`), unless the random effects have the same simplified
#' structure as fixed effects (e.g. for models from {MCMCglmm}).
#' structure as fixed effects (e.g. for models from **MCMCglmm**).
#'
#' @details In most cases when models either return different "effects" (fixed,
#' random) or "components" (conditional, zero-inflated, ...), the arguments
Expand Down
2 changes: 1 addition & 1 deletion R/get_predicted.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
#' + `NULL` uses the default method, which varies based on the model type.
#' + Most frequentist models: `"wald"` (default), `"residual"` or `"normal"`.
#' + Bayesian models: `"quantile"` (default), `"hdi"`, `"eti"`, and `"spi"`.
#' + Mixed effects {lme4} models: `"wald"` (default), `"residual"`, `"normal"`,
#' + Mixed effects **lme4** models: `"wald"` (default), `"residual"`, `"normal"`,
#' `"satterthwaite"`, and `"kenward-roger"`.
#'
#' See [`get_df()`] for details.
Expand Down
6 changes: 3 additions & 3 deletions R/get_varcov.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
#' - Other `sandwich` package functions: `"vcovHAC"`, `"vcovPC"`, `"vcovCL"`,
#' `"vcovPL"`.
#' @param vcov_args List of arguments to be passed to the function identified by
#' the `vcov` argument. This function is typically supplied by the {sandwich}
#' or {clubSandwich} packages. Please refer to their documentation (e.g.,
#' the `vcov` argument. This function is typically supplied by the **sandwich**
#' or **clubSandwich** packages. Please refer to their documentation (e.g.,
#' `?sandwich::vcovHAC`) to see the list of available arguments. If no estimation
#' type (argument `type`) is given, the default type for `"HC"` (or `"vcovHC"`)
#' equals the default from the {sandwich} package; for type `"CR"` (or
#' equals the default from the **sandwich** package; for type `"CR"` (or
#' `"vcoCR"`), the default is set to `"CR3"`.
#' @param verbose Toggle warnings.
#' @param ... Currently not used.
Expand Down
4 changes: 2 additions & 2 deletions R/get_variances.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@
#' intercepts and slopes.
#'
#' @note This function supports models of class `merMod` (including models
#' from {blme}), `clmm`, `cpglmm`, `glmmadmb`, `glmmTMB`, `MixMod`, `lme`,
#' from **blme**), `clmm`, `cpglmm`, `glmmadmb`, `glmmTMB`, `MixMod`, `lme`,
#' `mixed`, `rlmerMod`, `stanreg`, `brmsfit` or `wbm`. Support for objects of
#' class `MixMod` ({GLMMadaptive}), `lme` ({nlme}) or `brmsfit` ({brms}) is
#' class `MixMod` (**GLMMadaptive**), `lme` (**nlme**) or `brmsfit` (**brms**) is
#' experimental and may not work for all models.
#'
#' @references
Expand Down
4 changes: 2 additions & 2 deletions R/insight-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#' to obtain model information and data, many package-specific modelling functions
#' do not provide such methods to allow users to access such valuable information.
#'
#' {insight} is an R-package that fills this important gap by providing a
#' **insight** is an R-package that fills this important gap by providing a
#' suite of functions to support almost any model (see a list of the many models
#' supported below in the **List of Supported Packages and Models** section).
#' The goal of {insight}, then, is to provide tools to provide *easy*,
#' The goal of **insight**, then, is to provide tools to provide *easy*,
#' *intuitive*, and *consistent* access to information contained in model
#' objects. These tools aid applied research in virtually any field who fit,
#' diagnose, and present statistical models by streamlining access to every
Expand Down
2 changes: 1 addition & 1 deletion R/is_converged.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' errors.
#'
#' @section Inspect model convergence:
#' {lme4} performs a convergence-check (see `?lme4::convergence`), however, as
#' **lme4** performs a convergence-check (see `?lme4::convergence`), however, as
#' discussed [here](https://github.com/lme4/lme4/issues/120) and suggested by
#' one of the lme4-authors in [this comment](https://github.com/lme4/lme4/issues/120#issuecomment-39920269),
#' this check can be too strict. `is_converged()` thus provides an alternative
Expand Down
2 changes: 1 addition & 1 deletion R/is_model_supported.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Checks if a regression model object is supported in \pkg{insight} package
#' @title Checks if a regression model object is supported by the insight package
#' @name is_model_supported
#'
#' @description Small helper that checks if a model is a *supported*
Expand Down
2 changes: 1 addition & 1 deletion R/is_multivariate.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#'
#' @return
#' A logical, `TRUE` if either `x` is a model object and is a multivariate
#' response model, or `TRUE` if a return value from a function of \pkg{insight}
#' response model, or `TRUE` if a return value from a function of **insight**
#' is from a multivariate response model.
#'
#' @examplesIf require("rstanarm", quietly = TRUE)
Expand Down
4 changes: 2 additions & 2 deletions R/standardize_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' data frames returned by `broom::tidy()` are valid objects.
#' @param style Standardization can either be based on the naming conventions
#' from the [easystats-project](https://easystats.github.io/easystats/),
#' or on \pkg{broom}'s naming scheme.
#' or on **broom**'s naming scheme.
#' @param ignore_estimate Logical, if `TRUE`, column names like
#' `"mean"` or `"median"` will *not* be converted to
#' `"Coefficient"` resp. `"estimate"`.
Expand All @@ -28,7 +28,7 @@
#' used to get consistent, i.e. always the same column names, no matter what
#' kind of model was used in `model_parameters()`.
#'
#' For `style = "broom"`, column names are renamed to match \pkg{broom}'s
#' For `style = "broom"`, column names are renamed to match **broom**'s
#' naming scheme, i.e. `Parameter` is renamed to `term`,
#' `Coefficient` becomes `estimate` and so on.
#'
Expand Down
2 changes: 1 addition & 1 deletion WIP/tidy_easystats.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' a generic \code{tidy()}-method, the lifecycle of this function is still
#' experimental, and there might be a chance that it will become defunct and
#' removed in a future update. If possible, the preferred and stable alternative
#' to \code{tidy()} for \emph{easystats}-objects is \code{\link{standardize_names}}.
#' to \code{tidy()} for \emph**easystats**-objects is \code{\link{standardize_names}}.
#'
#' @examples
#' if (require("parameters")) {
Expand Down
9 changes: 8 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
This is a hotfix release, fixing a critical bug in the `check_if_installed()` function for R version < 4.1
This release fixes CRAN check errors related to the latest glmmTMB-update.

## revdepcheck results

We checked 38 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
6 changes: 3 additions & 3 deletions man/clean_parameters.Rd

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

4 changes: 2 additions & 2 deletions man/find_formula.Rd

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

8 changes: 4 additions & 4 deletions man/find_parameters.BGGM.Rd

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

14 changes: 7 additions & 7 deletions man/find_parameters.Rd

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

Loading

0 comments on commit 95ebd50

Please sign in to comment.