Skip to content

Commit

Permalink
oops!
Browse files Browse the repository at this point in the history
@strengejacke good catch
  • Loading branch information
mattansb committed Jan 8, 2025
1 parent eef125d commit fc28e24
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/methods_aov.R
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ model_parameters.seqanova.svyglm <- model_parameters.aov
if (length(idxResid) >= 1L && any(idxResid)) {
x$df_error <- x$df[idxResid]
x$Sum_Squares_Error <- x$Sum_Squares[idxResid]
x$Mean_Square_Error <- x$Sum_Squares[idxResid]
x$Mean_Square_Error <- x$Mean_Square[idxResid]
x <- x[!idxResid, ]
}
x
Expand Down
10 changes: 10 additions & 0 deletions tests/testthat/test-model_parameters.aov.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,14 @@ test_that("model_parameters.aov - table_wide", {

expect_identical(nrow(mp1), 3L)
expect_identical(nrow(mp2), 6L)



mod1 <- aov(yield ~ N * P * K + Error(block), data = npk)

out1 <- model_parameters(mod1, table_wide = FALSE)
out2 <- model_parameters(mod1, table_wide = TRUE)

expect_true(all(out2$Mean_Square_Error %in% out1$Mean_Square[out1$Parameter == "Residuals"]))
expect_true(all(out1$Mean_Square[out1$Parameter == "Residuals"] %in% out2$Mean_Square_Error))
})

0 comments on commit fc28e24

Please sign in to comment.