tests/testthat/test-logit.odd.R

context("logit.odd")

test_that("logit.odd outputs correctly", {
    odds <- 1
    logit <- log(odds)
    expect_true(logit.odd(logit) == odds)
    odds <- c(1, 0.5, 0.25, 2, 4)
    logit <- log(odds)
    expect_true(identical(logit.odd(logit), odds))
}) 

Try the optiRum package in your browser

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

optiRum documentation built on May 5, 2022, 1:05 a.m.