tests/testthat/test_links.R

library(corncob)
context("Test links")

test_that("Link functions match identities", {
  expect_equal(logit(0.5), 0)
  expect_equal(invlogit(0), 0.5)
  expect_equal(fishZ(0), 0)
  expect_equal(invfishZ(0), 0)
  expect_equal(coth(1), 1/tanh(1))
})
bryandmartin/corncob documentation built on Sept. 9, 2024, 4:08 a.m.