tests/testthat/test-main.R

test_that(
  "Identifies Trt and Y", {
    dat <- tehtuner_example[c(1:10, 501:510), ]
    names(dat)[names(dat) == "Trt"] <- "A"
    names(dat)[names(dat) == "Y"] <- "Outcome"

    set.seed(1)

    expect_no_error(
      tunevt(
        data = dat, Y = "Outcome", Trt = "A",
        step1 = "mars", step2 = "rtree", alpha0 = 0.95, p_reps = 1
        )
    )
  }
)

Try the tehtuner package in your browser

Any scripts or data that you put into this service are public.

tehtuner documentation built on April 3, 2023, 5:16 p.m.