tests/testthat/test_null_model_WLS_regression.R

context("check null model WLS regression")

test_that("WLS", {
    dat <- .testNullInputs()

    nullmod <- .fitNullModel(dat$y, dat$X, group.idx=dat$group.idx, verbose=FALSE)

    expect_equal(nullmod$family$family, "gaussian")
    expect_false(nullmod$family$mixedmodel)
    expect_true(nullmod$hetResid)
    expect_true(nullmod$converged)
    expect_null(nullmod$zeroFLAG) 
    expect_equivalent(nullmod$workingY, dat$y)
    expect_equivalent(nullmod$outcome, dat$y)
    expect_equivalent(nullmod$model.matrix, dat$X)
    expect_true(is(nullmod, "GENESIS.nullModel"))
})

Try the GENESIS package in your browser

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

GENESIS documentation built on Jan. 30, 2021, 2:01 a.m.