Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 30, 2023
1 parent 8ea7d85 commit cd1d463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/data_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ add_plot_attributes <- function(x) {

# for simulated residuals, we save all necessary information in the object
if (inherits(x, "performance_simres")) {
return(attributes(x)$model)
return(x$fittedModel)
}

if (!is.null(obj_name)) {
Expand Down
2 changes: 1 addition & 1 deletion R/plot.check_normality.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ plot.see_check_normality <- function(x,
if (type == "qq") {
model_info <- attributes(x)$model_info
if (inherits(x, "performance_simres")) {
dat <- stats::na.omit(data.frame(y = attributes(x)$scaledResiduals))
dat <- stats::na.omit(data.frame(y = x$scaledResiduals))
model_info$is_simulated_residuals <- TRUE
} else if (inherits(model, c("lme", "lmerMod", "merMod", "glmmTMB", "afex_aov", "BFBayesFactor"))) {
res_ <- suppressMessages(sort(stats::residuals(model), na.last = NA))
Expand Down

0 comments on commit cd1d463

Please sign in to comment.