tests/testthat/test_theta-utils.R

context("Testing theta-utils \n")

theta <- list(beta = c(-1, 0.1), 
              delta = c(0.2, 0.2))
theta <- complete_theta(theta)

test_that("theta2unbounded inverse works", {

  theta.restr <- theta2unbounded(theta, distname = "normal")
  # returns again the beta and delta from above
  expect_equivalent(theta2unbounded(theta.restr, inverse = TRUE, 
                                   distname = "normal"),
                    theta)
})

Try the LambertW package in your browser

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

LambertW documentation built on Nov. 2, 2023, 6:17 p.m.