konfound-project / konfound

R package for carrying out sensitivity analysis
https://konfound-it.org/konfound/
Other
15 stars 9 forks source link

model causing error with test #31

Closed jrosen48 closed 9 months ago

jrosen48 commented 3 years ago

For some reason, this is not passing a test; the message is that d is not found.

d <- forcats::gss_cat
d$married <- ifelse(d$marital == "Married", 1, 0)
m2 <- glm(married ~ age, data = d, family = binomial(link = "logit"))
output2 <- konfound(m2, age, to_return = "raw_output")

test_that("konfound works for glm, 2x2 model", {
    expect_equal(output2$percent_bias_to_change_inference, 35.357, tolerance = .001)
})