Skip to content

Commit 4930d83

Browse files
committedDec 14, 2016
reduce runtime of tests
1 parent 86f3b8a commit 4930d83

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed
 

‎man/mcmc.PAlive.Rd

+1-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/testthat/test-bg-cnbd-k.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test_that("BG/CNBD-k", {
55
# validate against BTYD implementation
66
set.seed(1)
77
params <- c(1, 0.85, 1.45, 0.79, 2.42)
8-
n <- 2000
8+
n <- 500
99
date.zero <- "2010-01-01"
1010
sim <- bgcnbd.GenerateData(n,
1111
round(runif(n, 36, 96) / 12) * 12,
@@ -34,7 +34,7 @@ test_that("BG/CNBD-k", {
3434
unname(bgcnbd.pmf(params, 32, 0:2)))
3535
expect_equal(BTYD::bgnbd.PlotFrequencyInCalibration(params[-1], cbs, 7),
3636
bgcnbd.PlotFrequencyInCalibration(params, cbs, 7), tolerance = 0.01)
37-
inc.tracking <- elog2inc(elog, by = 1)
37+
inc.tracking <- elog2inc(elog, by = 7)
3838
expect_equal(BTYD::bgnbd.PlotTrackingInc(params[-1], cbs$T.cal, max(cbs$T.cal) + 32, inc.tracking),
3939
bgcnbd.PlotTrackingInc(params, cbs$T.cal, max(cbs$T.cal) + 32, inc.tracking),
4040
tolerance = 0.01)
@@ -50,7 +50,7 @@ test_that("BG/CNBD-k", {
5050

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

0 commit comments

Comments
 (0)
Failed to load comments.