Skip to content

Commit

Permalink
Add tests for hypotheses to inferences
Browse files Browse the repository at this point in the history
Note it works for bootstrapping, but not for simulation based
  • Loading branch information
Tristan-Siegfried committed Sep 21, 2023
1 parent 48cc90f commit e3ce134
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion inst/tinytest/test-inferences.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,11 @@ p <- avg_predictions(mod, by = "cyl") |> inferences(method = "simulation", R = 2
expect_inherits(p, "predictions")


# inferences with hypotheses
mod <- lm(mpg ~ hp + cyl, data = mtcars)
p <- hypotheses(mod, hypothesis = "hp/cyl=1") |> inferences(method = "boot", R = 25)
# THIS BREAKS. Gets upset about passing an empty list through dots.
p <- hypotheses(mod, hypothesis = "hp/cyl=1") |> inferences(method = "simulation", R = 25)


rm(list = ls())
rm(list = ls())

0 comments on commit e3ce134

Please sign in to comment.