From 90d000834997fa1a593afc8db5d0628c23c2b113 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 22 Oct 2024 10:41:12 +0200 Subject: [PATCH] docs --- R/performance_aicc.R | 10 ++++++++++ man/performance-package.Rd | 12 ++++++------ man/performance_aicc.Rd | 10 ++++++++++ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/R/performance_aicc.R b/R/performance_aicc.R index 52cf3679c..bc1f3e0ab 100644 --- a/R/performance_aicc.R +++ b/R/performance_aicc.R @@ -28,6 +28,9 @@ #' scale. To get back to the original scale, the likelihood of the model is #' multiplied by the Jacobian/derivative of the transformation. #' +#' In case it is not possible to return the corrected AIC value, a waring +#' is given that the corrected log-likelihood value could not be computed. +#' #' @references #' - Akaike, H. (1973) Information theory as an extension of the maximum #' likelihood principle. In: Second International Symposium on Information @@ -52,6 +55,13 @@ #' # performance_aic() correctly detects transformed response and #' # returns corrected AIC #' performance_aic(model) +#' +#' \dontrun{ +#' # there are a few exceptions where the corrected log-likelihood values +#' # cannot be returned. The following exampe gives a warning. +#' model <- lm(1 / mpg ~ factor(cyl), mtcars) +#' performance_aic(model) +#' } #' @export performance_aicc <- function(x, ...) { UseMethod("performance_aicc") diff --git a/man/performance-package.Rd b/man/performance-package.Rd index f7a05c369..4644e6443 100644 --- a/man/performance-package.Rd +++ b/man/performance-package.Rd @@ -34,16 +34,16 @@ Useful links: } \author{ -\strong{Maintainer}: Daniel Lüdecke \email{d.luedecke@uke.de} (\href{https://orcid.org/0000-0002-8895-3206}{ORCID}) (@strengejacke) +\strong{Maintainer}: Daniel Lüdecke \email{d.luedecke@uke.de} (\href{https://orcid.org/0000-0002-8895-3206}{ORCID}) Authors: \itemize{ - \item Dominique Makowski \email{dom.makowski@gmail.com} (\href{https://orcid.org/0000-0001-5375-9967}{ORCID}) (@Dom_Makowski) [contributor] - \item Mattan S. Ben-Shachar \email{matanshm@post.bgu.ac.il} (\href{https://orcid.org/0000-0002-4287-4801}{ORCID}) (@mattansb) [contributor] - \item Indrajeet Patil \email{patilindrajeet.science@gmail.com} (\href{https://orcid.org/0000-0003-1995-6531}{ORCID}) (@patilindrajeets) [contributor] + \item Dominique Makowski \email{dom.makowski@gmail.com} (\href{https://orcid.org/0000-0001-5375-9967}{ORCID}) [contributor] + \item Mattan S. Ben-Shachar \email{matanshm@post.bgu.ac.il} (\href{https://orcid.org/0000-0002-4287-4801}{ORCID}) [contributor] + \item Indrajeet Patil \email{patilindrajeet.science@gmail.com} (\href{https://orcid.org/0000-0003-1995-6531}{ORCID}) [contributor] \item Philip Waggoner \email{philip.waggoner@gmail.com} (\href{https://orcid.org/0000-0002-7825-7573}{ORCID}) [contributor] - \item Brenton M. Wiernik \email{brenton@wiernik.org} (\href{https://orcid.org/0000-0001-9560-6336}{ORCID}) (@bmwiernik) [contributor] - \item Rémi Thériault \email{remi.theriault@mail.mcgill.ca} (\href{https://orcid.org/0000-0003-4315-6788}{ORCID}) (@rempsyc) [contributor] + \item Brenton M. Wiernik \email{brenton@wiernik.org} (\href{https://orcid.org/0000-0001-9560-6336}{ORCID}) [contributor] + \item Rémi Thériault \email{remi.theriault@mail.mcgill.ca} (\href{https://orcid.org/0000-0003-4315-6788}{ORCID}) [contributor] } Other contributors: diff --git a/man/performance_aicc.Rd b/man/performance_aicc.Rd index 0bf2120b7..529ee53aa 100644 --- a/man/performance_aicc.Rd +++ b/man/performance_aicc.Rd @@ -46,6 +46,9 @@ incorporates a correction for small sample sizes. unlike \code{stats::AIC()}, returns the "corrected" AIC value on the original scale. To get back to the original scale, the likelihood of the model is multiplied by the Jacobian/derivative of the transformation. + +In case it is not possible to return the corrected AIC value, a waring +is given that the corrected log-likelihood value could not be computed. } \examples{ m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) @@ -63,6 +66,13 @@ AIC(model) # performance_aic() correctly detects transformed response and # returns corrected AIC performance_aic(model) + +\dontrun{ +# there are a few exceptions where the corrected log-likelihood values +# cannot be returned. The following exampe gives a warning. +model <- lm(1 / mpg ~ factor(cyl), mtcars) +performance_aic(model) +} } \references{ \itemize{