tests/testthat/test-kinsim_double.R

test_that("two group exist", {
  expect_equal(length(unique(kinsim_double(GroupRel = c(.98,.644),
                                           ace2 = c(5,7,9),
                                           ifComb = TRUE)$GroupName)), 2)
})

test_that("nrow correct", {
     expect_equal(nrow(kinsim_double(GroupSizes = c(59,131),
                                     GroupRel = c(1,.644),
                                     ace1 = c(.5,.7,.19),
                                     ifComb = TRUE)), 190)
})

test_that("ncol correct", {
     expect_equal(ncol(kinsim_double(GroupSizes = c(159,231),
                                     GroupRel = c(.98,.5),
                                     ace2 = c(5,7,9),
                                     ifComb = FALSE)), 12)
})

Try the ACEsimFit package in your browser

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

ACEsimFit documentation built on Oct. 12, 2022, 9:05 a.m.