tests/testthat/test-lmkm.R

context('LM-KM')
rngReset()
tests = c(DEFAULT_LATREND_TESTS)

make.lmkm = function(id, time, response, ...) {
  form = as.formula(sprintf('%s ~ 1', response))
  lcMethodLMKM(formula = form, time = time, id = id, ..., seed = 1) %>% evaluate()
}

test_that('tests', {
  expect_true({
    test.latrend('lcMethodLMKM', instantiator = make.lmkm, tests = tests)
  })
})

Try the latrend package in your browser

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

latrend documentation built on March 31, 2023, 5:45 p.m.