tests/testthat/test_other.R

data(lalonde)
pscores <- propensity_scores(
  .data = lalonde,
  treatment = 'treat',
  response = 're78',
  confounders = c('age', 'educ')
)


test_that("propensity_scores() output is correct", {
  expect_equal(length(pscores), nrow(lalonde))
  expect_vector(pscores)
})
joemarlo/plotBart documentation built on May 31, 2024, 12:22 p.m.