Skip to content

Commit

Permalink
reduce runtime of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mplatzer committed Dec 14, 2016
1 parent 86f3b8a commit 4930d83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions man/mcmc.PAlive.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/testthat/test-bg-cnbd-k.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test_that("BG/CNBD-k", {
# validate against BTYD implementation
set.seed(1)
params <- c(1, 0.85, 1.45, 0.79, 2.42)
n <- 2000
n <- 500
date.zero <- "2010-01-01"
sim <- bgcnbd.GenerateData(n,
round(runif(n, 36, 96) / 12) * 12,
Expand Down Expand Up @@ -34,7 +34,7 @@ test_that("BG/CNBD-k", {
unname(bgcnbd.pmf(params, 32, 0:2)))
expect_equal(BTYD::bgnbd.PlotFrequencyInCalibration(params[-1], cbs, 7),
bgcnbd.PlotFrequencyInCalibration(params, cbs, 7), tolerance = 0.01)
inc.tracking <- elog2inc(elog, by = 1)
inc.tracking <- elog2inc(elog, by = 7)
expect_equal(BTYD::bgnbd.PlotTrackingInc(params[-1], cbs$T.cal, max(cbs$T.cal) + 32, inc.tracking),
bgcnbd.PlotTrackingInc(params, cbs$T.cal, max(cbs$T.cal) + 32, inc.tracking),
tolerance = 0.01)
Expand All @@ -50,7 +50,7 @@ test_that("BG/CNBD-k", {

# generate artificial BG/CNBD-k data
set.seed(1)
n <- 2000
n <- 1000
params <- c(k = 3, r = 0.85, alpha = 1.45, a = 0.79, b = 2.42)
sim <- bgcnbd.GenerateData(n,
round(runif(n, 36, 96) / 12) * 12,
Expand Down

0 comments on commit 4930d83

Please sign in to comment.