File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ S3method(check_normality,htest)
70
70
S3method(check_normality,lmerModLmerTest)
71
71
S3method(check_normality,merMod)
72
72
S3method(check_normality,numeric)
73
+ S3method(check_normality,performance_simres)
73
74
S3method(check_outliers,BFBayesFactor)
74
75
S3method(check_outliers,character)
75
76
S3method(check_outliers,data.frame)
Original file line number Diff line number Diff line change @@ -92,6 +92,24 @@ check_normality.glm <- function(x, ...) {
92
92
invisible (out )
93
93
}
94
94
95
+ # DHARMa -------------------
96
+
97
+ # ' @export
98
+ check_normality.performance_simres <- function (x , ... ) {
99
+ # check for normality of residuals
100
+ res <- stats :: residuals(x , quantileFunction = stats :: qnorm )
101
+ p.val <- suppressWarnings(stats :: ks.test(stats :: residuals(x ), " punif" ))$ p.value
102
+
103
+ attr(p.val , " data" ) <- res
104
+ attr(p.val , " object_name" ) <- insight :: safe_deparse_symbol(substitute(x ))
105
+ attr(p.val , " effects" ) <- " fixed"
106
+ attr(p.val , " type" ) <- " residuals"
107
+ class(p.val ) <- unique(c(" check_normality" , " see_check_normality" , class(p.val )))
108
+
109
+ p.val
110
+ }
111
+
112
+
95
113
# numeric -------------------
96
114
97
115
# ' @export
You can’t perform that action at this time.
0 commit comments