Skip to content

Commit

Permalink
include in check_model
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Mar 15, 2024
1 parent 020d799 commit ff6f138
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 14 deletions.
40 changes: 27 additions & 13 deletions R/plot.check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,33 @@ plot.see_check_model <- function(x,
}

if ("QQ" %in% names(x) && !is.null(x$QQ) && any(c("qq", "all") %in% check)) {
p$QQ <- .plot_diag_qq(
x$QQ,
size_point,
size_line,
alpha_level = alpha_level,
detrend = detrend,
theme_style = style,
colors = colors,
dot_alpha_level = dot_alpha_level,
show_dots = TRUE, # qq-plots w/o dots makes no sense
model_info = model_info,
model_class = model_class
)
if (inherits(x$QQ, "performance_simres")) {
p$QQ <- plot(
x$QQ,
size_line = size_line,
size_point = size_point,
alpha = alpha_level,
dot_alpha = dot_alpha_level,
colors = colors,
detrend = detrend,
style = style

)
} else {
p$QQ <- .plot_diag_qq(
x$QQ,
size_point,
size_line,
alpha_level = alpha_level,
detrend = detrend,
theme_style = style,
colors = colors,
dot_alpha_level = dot_alpha_level,
show_dots = TRUE, # qq-plots w/o dots makes no sense
model_info = model_info,
model_class = model_class
)
}
}

if ("NORM" %in% names(x) && !is.null(x$NORM) && any(c("normality", "all") %in% check)) {
Expand Down
4 changes: 3 additions & 1 deletion R/plot.performance_simres.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#' `performance::simulate_residuals()` function.
#'
#' @inheritParams plot.see_check_normality
#' @inheritParams plot.see_check_model
#'
#' @return A ggplot2-object.
#'
Expand Down Expand Up @@ -32,6 +33,7 @@ plot.see_performance_simres <- function(x,
dot_alpha = 0.8,
colors = c("#3aaf85", "#1b6ca8"),
detrend = FALSE,
style = theme_lucid,
...) {
dp <- list(min = 0, max = 1, lower.tail = TRUE, log.p = FALSE)

Expand Down Expand Up @@ -97,7 +99,7 @@ plot.see_performance_simres <- function(x,
x = "Standard Uniform Distribution Quantiles",
y = y_lab
) +
theme_lucid(
style(
base_size = 10,
plot.title.space = 3,
axis.title.space = 5
Expand Down
3 changes: 3 additions & 0 deletions man/plot.see_performance_simres.Rd

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

0 comments on commit ff6f138

Please sign in to comment.