Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test get_variance for zero-inflation models #893

Merged
merged 22 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.20.1.5
Version: 0.20.1.6
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down
17 changes: 17 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@

* Improved accuracy of singularity-checks in `get_variance()`.

* `get_variance()` gets a few new arguments:

* `null_model`, to provide a null-model to be used for the calculation of
random effect variances. If `NULL`, the null-model is computed internally.
This argument is optional, but may be useful to save time, or when the
null-model cannot be calculated internally.

* `approximation`, indicating the approximation method for the distribution-specific
(observation level, or residual) variance.

* `model_component`, for models that can have a zero-inflation component,
specify for which component variances should be returned. By default, both
the conditional and the zero-inflation component are taken into account.

* `format_alert()` and `format_warning()` get an `immediate` argument, to
output warnings immediately.

## Bug fixes

* `null_model()` now correctly handles zero-inflated models from package
Expand Down
3 changes: 2 additions & 1 deletion R/colour_tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
return(FALSE)
}

if ((cols <- Sys.getenv("RSTUDIO_CONSOLE_COLOR", "")) != "" && !is.na(as.numeric(cols))) {
cols <- Sys.getenv("RSTUDIO_CONSOLE_COLOR", "")
if (cols != "" && !is.na(as.numeric(cols))) {
return(TRUE)
}

Expand Down Expand Up @@ -188,7 +189,7 @@

# tools -----------------------------------

.colour <- function(colour = "red", x) {

Check warning on line 192 in R/colour_tools.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/colour_tools.R,line=192,col=37,[function_argument_linter] Arguments without defaults should come before arguments with defaults.

Check warning on line 192 in R/colour_tools.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/colour_tools.R,line=192,col=37,[function_argument_linter] Arguments without defaults should come before arguments with defaults.
# replace "bright" suffixes to a generic color code
if (grepl("^(bright_|br_)", colour)) {
colour <- gsub("^(bright_|br_)", "b", colour)
Expand Down
Loading
Loading