From cd1d463aea06b96b5a708dd57ac4cb2256d11602 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 30 Oct 2023 08:21:43 +0100 Subject: [PATCH] fix --- R/data_plot.R | 2 +- R/plot.check_normality.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/data_plot.R b/R/data_plot.R index caa0ea59b..4f45c508f 100644 --- a/R/data_plot.R +++ b/R/data_plot.R @@ -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)) { diff --git a/R/plot.check_normality.R b/R/plot.check_normality.R index 98630f481..f41619858 100644 --- a/R/plot.check_normality.R +++ b/R/plot.check_normality.R @@ -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))