tests/testthat/test-start.R

stopifnot(require("testthat"),
          require("glmmTMB"))

data(sleepstudy, cbpp,
     package = "lme4")

test_that("error messages for user-spec start", {
    expect_error(
        glmmTMB(Reaction~Days+(Days|Subject), sleepstudy,
                start=list(beta=c(2))),
        "parameter vector length mismatch.*length\\(beta\\)==1, should be 2")
    expect_error(glmmTMB(Reaction~Days+(Days|Subject), sleepstudy,
                         start=list(junk=5)),
                 "unrecognized vector 'junk'")
})

Try the glmmTMB package in your browser

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

glmmTMB documentation built on Oct. 7, 2023, 5:07 p.m.