tests/testthat/test_bootstrap.R

context("Bootstrapping methods tests")

## Get some results
data(Ecoli)
fnx <- function(days,B1,B2,B3) B1/(1+exp(B2+B3*days))
nl1 <- nls(cells~fnx(days,B1,B2,B3),data=Ecoli,start=list(B1=6,B2=7.2,B3=-1.45))
if (require(car)) bc <- bootCase(nl1,B=99)

test_that("confint.bootCase() messages and results",{
  if (require(car)) expect_error(confint(bc,parm=0),"must be positive")
})
droglenc/TestPackage documentation built on May 15, 2019, 2:51 p.m.