tests/testthat/test_null_model_glmm.R

context("check null model glmm")

test_that("glmm", {
    dat <- .testNullInputs(binary=TRUE)
    
    nullmod <- fitNullMod(dat$y, dat$X, covMatList=dat$cor.mat, family="binomial", verbose=FALSE)

    expect_equal(nullmod$family$family, "binomial")
    if (!nullmod$zeroFLAG) expect_true(nullmod$family$mixedmodel)
    if (nullmod$zeroFLAG) expect_false(nullmod$family$mixedmodel)
    expect_false(nullmod$hetResid)
    expect_true(nullmod$converged)
    expect_equivalent(nullmod$outcome, dat$y)
    expect_equivalent(nullmod$model.matrix, dat$X)
    expect_equal(nullmod$RSS, 1)
})

Try the GENESIS package in your browser

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

GENESIS documentation built on May 2, 2018, 4:09 a.m.