Skip to content

Commit

Permalink
Merge branch 'main' into strengejacke/issue806
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke authored Sep 18, 2023
2 parents 2e95247 + ab0dd3a commit 6c9c4ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/testthat/test-get_modelmatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ test_that("get_modelmatrix - ivreg", {
skip_if(getRversion() < "4.2.0")
skip_if_not_installed("ivreg")
data(Kmenta, package = "ivreg")
d_kmenta <<- Kmenta

set.seed(15)
x <- ivreg::ivreg(Q ~ P + D | D + F + A, data = Kmenta)
x <- ivreg::ivreg(Q ~ P + D | D + F + A, data = d_kmenta)

out1 <- get_modelmatrix(x)
out2 <- model.matrix(x, data = Kmenta)
out2 <- model.matrix(x, data = d_kmenta)
expect_equal(out1, out2, tolerance = 1e-3, ignore_attr = TRUE)

out1 <- get_modelmatrix(x, data = get_datagrid(x, at = "P"))
Expand Down

0 comments on commit 6c9c4ad

Please sign in to comment.