Last updated on 2025-02-04 05:50:18 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.15.3 | 142.14 | 94.04 | 236.18 | OK | --no-tests |
r-devel-linux-x86_64-debian-gcc | 0.15.3 | 136.12 | 70.01 | 206.13 | OK | --no-tests |
r-devel-linux-x86_64-fedora-clang | 0.15.3 | 644.77 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 0.15.3 | 826.66 | ERROR | |||
r-devel-windows-x86_64 | 0.15.3 | 146.00 | 436.00 | 582.00 | ERROR | |
r-patched-linux-x86_64 | 0.15.3 | 189.14 | 92.16 | 281.30 | OK | --no-tests |
r-release-linux-x86_64 | 0.15.3 | 185.00 | 94.77 | 279.77 | OK | --no-tests |
r-release-macos-arm64 | 0.15.3 | 208.00 | NOTE | |||
r-release-macos-x86_64 | 0.15.3 | 685.00 | NOTE | |||
r-release-windows-x86_64 | 0.15.3 | 145.00 | 428.00 | 573.00 | ERROR | |
r-oldrel-macos-arm64 | 0.15.3 | 253.00 | NOTE | |||
r-oldrel-macos-x86_64 | 0.15.3 | 533.00 | NOTE | |||
r-oldrel-windows-x86_64 | 0.15.3 | 183.00 | 506.00 | 689.00 | ERROR |
Version: 0.15.3
Check: tests
Result: ERROR
Running ‘coef.R’
Running ‘confint.R’ [48s/66s]
Running ‘datetime.R’
Running ‘egf.R’
Running ‘egf_enum.R’
Running ‘egf_eval.R’
Running ‘egf_examples_day_of_week.R’
Running ‘egf_examples_excess.R’
Running ‘egf_examples_fixed.R’
Running ‘egf_examples_random.R’ [12s/13s]
Running ‘egf_link.R’
Running ‘egf_misc.R’
Running ‘egf_options.R’
Running ‘egf_utils.R’
Running ‘epidemic.R’
Running ‘extract.R’
Running ‘fitted.R’
Running ‘gi.R’
Running ‘include.R’ [95s/96s]
Running ‘language.R’
Running ‘prior.R’
Running ‘profile.R’ [16s/24s]
Running ‘summary.R’
Running ‘utils.R’
Running ‘validity.R’
Running ‘zzz.R’
Running the tests in ‘tests/egf_examples_random.R’ failed.
Complete output:
> library(epigrowthfit)
> options(warn = 2L, error = if (interactive()) recover, egf.cores = 2L)
>
>
> ## exponential #########################################################
>
> r <- log(2) / 20
> c0 <- 100
> s <- 0.2
>
> mu <- log(c(r, c0))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "exponential", family = "pois"),
+ nsim = 20L,
+ seed = 775494L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-05
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 5e-02)
+ })
>
>
> ## subexponential ######################################################
>
> alpha <- log(2) / 20
> c0 <- 100
> p <- 0.95
> s <- 0.2
>
> mu <- c(log(alpha), log(c0), qlogis(p))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "subexponential", family = "pois"),
+ nsim = 20L,
+ seed = 653927L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(beta[3L] ~ Normal(mu = qlogis(p), sigma = 0.05),
+ theta[3L] ~ Normal(mu = log(s), sigma = 0.25),
+ Sigma ~ LKJ(eta = 2)))
*** caught segfault ***
address (nil), cause 'memory not mapped'
Traceback:
1: MakeADHessObject(obj$env$data, obj$env$parameters, obj$env$reportenv, gf = obj$env$ADGrad$ptr, skip = skip, DLL = obj$env$DLL)
2: sparseHessianFun(env, skipFixedEffects = skipFixedEffects)
3: he(par)
4: newton(par = c(b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0, b = 0), fn = function (par.random, order = 0, ...) { par[random] <- par.random par[-random] <- par.fixed res <- f(par, order = order, set_tail = random[1], ...) switch(order + 1, res, res[random], res[random, random])}, gr = function (x) f0(x, order = 1), he = function (par.random) { par[random] <- par.random par[-random] <- par.fixed spHess(par, random = TRUE, set_tail = random[1])}, env = <environment>, trace = FALSE)
5: do.call("newton", c(list(par = eval(random.start), fn = f0, gr = function(x) f0(x, order = 1), he = H0, env = env), inner.control))
6: doTryCatch(return(expr), name, parentenv, handler)
7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
8: tryCatchList(expr, classes, parentenv, handlers)
9: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
10: try(do.call("newton", c(list(par = eval(random.start), fn = f0, gr = function(x) f0(x, order = 1), he = H0, env = env), inner.control)), silent = silent)
11: ff(x, order = 0)
12: doTryCatch(return(expr), name, parentenv, handler)
13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
14: tryCatchList(expr, classes, parentenv, handlers)
15: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
16: try({ if (MCcontrol$doMC) { ff(x, order = 0) MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed, order = 0) } else ff(x, order = 0)}, silent = silent)
17: objective(.par, ...)
18: nlminb(start = par, objective = fn, gradient = gr, control = control, ...)
19: (function (par, fn, gr, control, ...) { ans <- nlminb(start = par, objective = fn, gradient = gr, control = control, ...) m <- match("objective", names(ans), 0L) names(ans)[m] <- "value" ans})(par = c(beta = -2.55255273564977, beta = 2.19663634451701, beta = 2.94443897916644, theta = 0, theta = 0, theta = 0, theta = 0, theta = 0, theta = 0), fn = function (x = last.par[lfixed()], ...) { if (tracepar) { cat("par:\n") print(x) } if (!validpar(x)) return(NaN) if (is.null(random)) { ans <- f(x, order = 0) if (!ADreport) { if (is.finite(ans) && ans < value.best) { last.par.best <<- x value.best <<- ans } } } else { ans <- try({ if (MCcontrol$doMC) { ff(x, order = 0) MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed, order = 0) } else ff(x, order = 0) }, silent = silent) if (is.character(ans)) ans <- NaN } ans}, gr = function (x = last.par[lfixed()], ...) { if (is.null(random)) { ans <- f(x, order = 1) } else { ans <- try({ if (MCcontrol$doMC) { ff(x, order = 0) MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed, order = 1) } else ff(x, order = 1) }, silent = silent) if (is.character(ans)) ans <- rep(NaN, length(x)) } if (tracemgc) cat("outer mgc: ", max(abs(ans)), "\n") ans}, control = list())
20: do.call(optimizer, optimizer_args)
21: egf.egf_model(model = list(curve = "subexponential", excess = FALSE, family = "pois", day_of_week = 0L), formula_ts = cbind(time, x) ~ ts, formula_windows = cbind(start, end) ~ ts, formula_parameters = ~(1 | ts), data_ts = list(ts = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L), time = c(0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L), x = c(NA, 4, 4, 3, 6, 3, 7, 4, 4, 2, 5, 9, 7, 3, 4, 3, 6, 6, 7, 3, 8, 4, 6, 4, 10, 6, 8, 2, 12, 14, 9, 8, 13, 7, 13, 12, 15, 15, 11, 11, 12, 11, 14, 9, 14, 14, 19, 13, 11, 18, 15, 27, 21, 23, 19, 26, 14, 19, 20, 21, 26, 19, 22, 25, 21, 24, 25, 29, 25, 33, 34, 22, 25, 33, 37, 29, 28, 36, 28, 44, 44, 34, 42, 47, 36, 52, 44, 53, 51, 55, 58, 52, 47, 66, 60, 62, 54, 52, 76, 61, 67, NA, 0, 1, 1, 4, 1, 4, 6, 4, 5, 5, 7, 4, 3, 2, 6, 3, 3, 7, 0, 5, 4, 5, 5, 2, 7, 4, 2, 6, 2, 4, 3, 3, 6, 3, 4, 4, 5, 5, 6, 8, 4, 5, 8, 5, 4, 10, 6, 4, 3, 6, 6, 5, 2, 8, 7, 6, 3, 13, 8, 6, 8, 3, 2, 3, 5, 3, 9, 6, 10, 6, 10, 9, 8, 9, 7, 12, 10, 8, 6, 13, 9, 7, 11, 6, 8, 7, 8, 6, 12, 9, 14, 13, 7, 19, 10, 22, 14, 14, 14, 12, NA, 5, 6, 2, 3, 2, 6, 5, 4, 5, 2, 4, 3, 7, 5, 0, 3, 2, 4, 3, 4, 3, 4, 3, 2, 3, 4, 5, 2, 4, 10, 5, 10, 7, 8, 8, 8, 7, 10, 8, 11, 12, 6, 9, 8, 8, 9, 7, 8, 17, 11, 15, 20, 9, 9, 8, 16, 9, 16, 16, 7, 17, 17, 9, 15, 13, 21, 11, 14, 17, 14, 22, 10, 19, 15, 13, 20, 22, 24, 14, 27, 15, 21, 26, 17, 13, 28, 25, 20, 25, 22, 28, 30, 32, 31, 32, 22, 31, 33, 32, 30, NA, 4, 3, 1, 4, 2, 0, 0, 6, 2, 1, 1, 3, 4, 3, 3, 2, 2, 3, 1, 4, 4, 4, 3, 3, 3, 2, 3, 2, 4, 6, 5, 7, 5, 2, 3, 2, 5, 6, 4, 5, 7, 4, 6, 4, 3, 3, 5, 7, 3, 1, 8, 5, 10, 7, 3, 4, 6, 5, 9, 4, 4, 17, 9, 5, 5, 6, 9, 6, 5, 8, 14, 14, 5, 9, 11, 8, 6, 11, 11, 9, 13, 9, 7, 9, 10, 17, 9, 8, 16, 14, 9, 10, 14, 8, 6, 15, 11, 15, 14, 17, NA, 0, 3, 4, 3, 4, 3, 2, 3, 3, 6, 3, 3, 2, 3, 6, 5, 8, 3, 4, 4, 1, 4, 3, 2, 3, 10, 4, 6, 6, 10, 8, 8, 8, 7, 12, 6, 6, 9, 11, 11, 6, 4, 10, 18, 12, 13, 12, 10, 13, 11, 14, 13, 17, 18, 16, 9, 14, 11, 10, 21, 16, 14, 16, 20, 20, 13, 15, 17, 22, 26, 17, 24, 23, 21, 21, 31, 21, 27, 22, 26, 31, 30, 26, 31, 40, 34, 28, 24, 38, 40, 40, 33, 27, 41, 39, 39, 31, 42, 44, 42, NA, 5, 3, 7, 2, 3, 3, 2, 8, 5, 2, 1, 3, 4, 1, 5, 7, 5, 5, 6, 4, 4, 4, 6, 6, 3, 4, 3, 3, 7, 6, 9, 5, 7, 8, 4, 11, 2, 11, 5, 6, 11, 11, 8, 6, 2, 6, 7, 7, 11, 11, 10, 12, 6, 9, 10, 14, 5, 10, 13, 11, 16, 8, 13, 10, 10, 8, 10, 14, 19, 14, 12, 15, 7, 16, 13, 6, 10, 25, 10, 25, 28, 19, 20, 18, 18, 14, 20, 20, 21, 17, 29, 23, 21, 27, 22, 13, 27, 27, 26, 23, NA, 3, 3, 2, 6, 4, 5, 3, 5, 6, 6, 6, 5, 6, 5, 8, 0, 6, 4, 6, 8, 4, 7, 11, 9, 7, 9, 7, 10, 7, 4, 7, 6, 7, 2, 9, 7, 8, 6, 9, 7, 10, 16, 11, 12, 6, 5, 18, 7, 9, 8, 11, 9, 17, 16, 13, 12, 11, 6, 11, 8, 22, 15, 6, 11, 11, 12, 12, 18, 18, 21, 16, 16, 28, 19, 15, 22, 20, 19, 24, 19, 15, 13, 16, 27, 21, 27, 22, 28, 27, 20, 20, 31, 20, 23, 34, 29, 22, 25, 33, 22, NA, 0, 3, 0, 2, 0, 1, 0, 2, 1, 1, 7, 1, 1, 3, 0, 2, 1, 0, 2, 0, 1, 2, 2, 2, 3, 0, 3, 0, 3, 3, 4, 2, 2, 2, 3, 6, 3, 3, 7, 4, 3, 5, 3, 4, 4, 1, 0, 5, 4, 0, 3, 4, 9, 4, 7, 4, 5, 2, 2, 3, 1, 3, 5, 7, 6, 6, 5, 3, 6, 1, 3, 5, 4, 6, 3, 6, 5, 5, 5, 8, 8, 6, 7, 8, 3, 7, 8, 10, 4, 6, 11, 11, 5, 8, 6, 4, 3, 5, 11, 10, NA, 5, 2, 2, 2, 2, 0, 1, 4, 2, 3, 4, 1, 1, 2, 2, 2, 6, 0, 6, 7, 7, 5, 3, 1, 2, 3, 1, 2, 6, 5, 3, 3, 9, 8, 5, 3, 10, 4, 4, 3, 4, 8, 5, 7, 10, 8, 4, 5, 8, 3, 5, 4, 6, 7, 3, 9, 5, 6, 10, 8, 9, 12, 10, 11, 9, 10, 8, 14, 5, 14, 4, 14, 17, 11, 7, 9, 13, 11, 11, 10, 18, 11, 12, 16, 11, 9, 20, 14, 22, 17, 17, 15, 19, 18, 13, 22, 17, 11, 15, 14, NA, 1, 3, 6, 4, 6, 2, 2, 6, 5, 1, 7, 7, 8, 1, 5, 7, 11, 2, 5, 5, 7, 4, 9, 8, 8, 6, 4, 7, 7, 3, 5, 6, 9, 8, 8, 7, 11, 12, 5, 7, 6, 9, 5, 7, 9, 8, 6, 10, 9, 17, 12, 7, 16, 12, 18, 16, 14, 18, 16, 23, 14, 15, 13, 16, 16, 9, 17, 15, 24, 21, 17, 18, 15, 11, 15, 18, 20, 17, 23, 27, 22, 28, 21, 25, 28, 25, 28, 25, 37, 37, 37, 28, 31, 28, 35, 28, 37, 40, 37, 36, NA, 2, 1, 4, 5, 2, 5, 2, 5, 10, 5, 5, 5, 5, 6, 5, 4, 4, 6, 6, 3, 3, 10, 4, 6, 8, 7, 7, 11, 11, 7, 12, 6, 11, 5, 6, 10, 11, 8, 6, 15, 8, 7, 17, 14, 9, 9, 17, 15, 16, 26, 20, 15, 19, 10, 17, 14, 19, 16, 19, 20, 18, 18, 24, 16, 23, 18, 34, 21, 23, 28, 25, 26, 37, 30, 26, 36, 25, 38, 28, 42, 32, 48, 42, 26, 29, 38, 40, 44, 44, 56, 41, 47, 63, 60, 41, 56, 56, 63, 52, 57, NA, 0, 1, 1, 1, 4, 1, 2, 0, 1, 3, 1, 5, 2, 2, 3, 6, 3, 3, 0, 4, 2, 3, 5, 8, 6, 4, 3, 1, 4, 7, 2, 9, 8, 3, 10, 8, 5, 8, 9, 10, 7, 8, 9, 4, 6, 5, 4, 7, 10, 3, 8, 10, 14, 6, 8, 6, 9, 13, 4, 11, 9, 8, 12, 13, 12, 12, 14, 16, 15, 13, 9, 8, 15, 14, 12, 24, 19, 13, 16, 12, 13, 12, 16, 19, 16, 17, 21, 21, 19, 18, 27, 25, 23, 22, 24, 20, 17, 14, 33, 24, NA, 0, 3, 0, 1, 1, 3, 1, 0, 3, 1, 1, 1, 1, 1, 0, 1, 1, 3, 2, 1, 0, 2, 2, 1, 0, 0, 1, 2, 0, 3, 0, 2, 0, 1, 0, 1, 2, 3, 4, 1, 4, 2, 4, 4, 3, 4, 2, 3, 6, 1, 2, 1, 1, 2, 2, 2, 3, 2, 3, 3, 3, 2, 1, 3, 11, 2, 4, 3, 3, 5, 4, 1, 3, 4, 5, 1, 6, 0, 4, 2, 0, 4, 2, 2, 2, 3, 4, 2, 3, 1, 2, 3, 5, 4, 1, 4, 2, 4, 6, 5, NA, 1, 0, 5, 0, 0, 3, 1, 4, 1, 5, 3, 2, 5, 2, 2, 3, 3, 7, 3, 3, 3, 1, 3, 2, 2, 2, 10, 4, 5, 6, 1, 5, 7, 5, 6, 6, 10, 10, 6, 7, 3, 10, 11, 11, 4, 6, 6, 5, 4, 9, 5, 11, 10, 10, 11, 7, 15, 17, 13, 13, 8, 17, 9, 21, 15, 16, 13, 15, 18, 13, 16, 16, 17, 15, 16, 17, 21, 18, 16, 16, 19, 27, 26, 25, 23, 15, 23, 21, 25, 21, 24, 24, 23, 29, 33, 44, 33, 32, 34, 35, NA, 3, 4, 2, 3, 3, 3, 4, 7, 9, 9, 3, 2, 5, 7, 4, 8, 2, 5, 5, 9, 2, 9, 11, 6, 7, 7, 6, 5, 7, 3, 13, 7, 6, 9, 11, 7, 8, 14, 14, 15, 10, 10, 10, 13, 21, 15, 12, 21, 11, 13, 15, 12, 15, 14, 19, 15, 19, 16, 23, 15, 21, 18, 24, 30, 29, 17, 17, 30, 30, 16, 27, 18, 26, 32, 23, 24, 28, 33, 32, 34, 27, 30, 47, 28, 37, 45, 36, 40, 49, 45, 43, 40, 55, 54, 55, 49, 58, 50, 49, 47, NA, 2, 4, 2, 3, 4, 2, 4, 3, 2, 4, 4, 5, 1, 3, 1, 2, 1, 4, 1, 1, 0, 2, 1, 1, 4, 5, 2, 4, 5, 2, 5, 3, 0, 2, 3, 4, 11, 3, 8, 8, 2, 1, 6, 4, 1, 3, 3, 8, 2, 4, 1, 9, 4, 6, 3, 2, 3, 9, 3, 5, 6, 4, 8, 4, 4, 5, 4, 6, 6, 8, 8, 7, 5, 5, 7, 4, 5, 8, 4, 8, 8, 10, 4, 5, 7, 9, 11, 6, 5, 6, 7, 8, 7, 11, 8, 6, 5, 7, 17, 13, NA, 1, 3, 1, 1, 3, 1, 2, 2, 2, 0, 3, 0, 2, 3, 1, 1, 2, 1, 3, 1, 4, 3, 5, 2, 3, 1, 1, 5, 2, 4, 5, 2, 2, 2, 7, 1, 4, 5, 5, 1, 2, 3, 6, 3, 4, 6, 8, 6, 4, 8, 7, 4, 3, 6, 7, 6, 4, 6, 6, 8, 6, 5, 4, 5, 7, 11, 7, 6, 4, 12, 5, 9, 10, 10, 8, 10, 9, 10, 6, 12, 10, 7, 5, 9, 8, 13, 9, 6, 12, 11, 11, 9, 8, 13, 12, 14, 6, 10, 13, 9, NA, 7, 7, 6, 2, 8, 8, 5, 5, 4, 2, 6, 6, 8, 4, 6, 9, 11, 11, 10, 9, 13, 9, 7, 13, 12, 9, 13, 8, 8, 15, 22, 14, 13, 17, 11, 25, 20, 21, 25, 33, 20, 24, 18, 26, 25, 27, 33, 29, 15, 29, 35, 33, 30, 17, 34, 39, 32, 38, 39, 35, 43, 63, 39, 42, 49, 41, 51, 41, 56, 45, 55, 66, 66, 67, 74, 84, 72, 69, 75, 77, 90, 94, 75, 91, 89, 104, 96, 117, 95, 102, 104, 130, 101, 129, 122, 143, 117, 139, 142, 145, NA, 2, 3, 2, 1, 2, 3, 2, 3, 4, 4, 2, 6, 1, 3, 2, 3, 2, 2, 4, 1, 4, 2, 4, 3, 4, 3, 4, 5, 4, 4, 6, 4, 3, 3, 5, 5, 5, 1, 8, 0, 3, 6, 8, 5, 6, 5, 6, 7, 7, 6, 3, 7, 9, 2, 3, 8, 4, 8, 13, 6, 7, 7, 6, 10, 8, 12, 10, 13, 8, 7, 11, 9, 7, 10, 4, 12, 9, 6, 5, 9, 17, 9, 5, 20, 13, 13, 10, 9, 19, 10, 13, 10, 20, 14, 15, 13, 9, 9, 20, 17, NA, 0, 2, 2, 1, 3, 2, 3, 3, 3, 4, 3, 5, 3, 4, 2, 5, 3, 4, 4, 2, 2, 5, 2, 5, 3, 4, 5, 1, 2, 5, 1, 3, 7, 3, 5, 4, 6, 4, 6, 4, 4, 2, 7, 3, 8, 4, 9, 3, 7, 7, 11, 5, 4, 6, 5, 6, 7, 6, 4, 4, 7, 7, 8, 2, 8, 8, 8, 11, 6, 13, 8, 6, 15, 12, 8, 8, 11, 15, 9, 12, 15, 15, 12, 8, 18, 14, 15, 22, 15, 17, 15, 16, 13, 10, 12, 19, 12, 29, 17, 12)), data_windows = list(ts = 1:20, start = c(3L, 6L, 2L, 4L, 5L, 3L, 4L, 11L, 4L, 4L, 4L, 9L, 9L, 8L, 4L, 4L, 7L, 2L, 6L, 7L), end = c(100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100)), formula_priors = list(beta[3L] ~ Normal(mu = qlogis(p), sigma = 0.05), theta[3L] ~ Normal(mu = log(s), sigma = 0.25), Sigma ~ LKJ(eta = 2)))
22: (function (model, ...) UseMethod("egf", model))(model = list(curve = "subexponential", excess = FALSE, family = "pois", day_of_week = 0L), formula_ts = cbind(time, x) ~ ts, formula_windows = cbind(start, end) ~ ts, formula_parameters = ~(1 | ts), data_ts = list(ts = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L), time = c(0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L), x = c(NA, 4, 4, 3, 6, 3, 7, 4, 4, 2, 5, 9, 7, 3, 4, 3, 6, 6, 7, 3, 8, 4, 6, 4, 10, 6, 8, 2, 12, 14, 9, 8, 13, 7, 13, 12, 15, 15, 11, 11, 12, 11, 14, 9, 14, 14, 19, 13, 11, 18, 15, 27, 21, 23, 19, 26, 14, 19, 20, 21, 26, 19, 22, 25, 21, 24, 25, 29, 25, 33, 34, 22, 25, 33, 37, 29, 28, 36, 28, 44, 44, 34, 42, 47, 36, 52, 44, 53, 51, 55, 58, 52, 47, 66, 60, 62, 54, 52, 76, 61, 67, NA, 0, 1, 1, 4, 1, 4, 6, 4, 5, 5, 7, 4, 3, 2, 6, 3, 3, 7, 0, 5, 4, 5, 5, 2, 7, 4, 2, 6, 2, 4, 3, 3, 6, 3, 4, 4, 5, 5, 6, 8, 4, 5, 8, 5, 4, 10, 6, 4, 3, 6, 6, 5, 2, 8, 7, 6, 3, 13, 8, 6, 8, 3, 2, 3, 5, 3, 9, 6, 10, 6, 10, 9, 8, 9, 7, 12, 10, 8, 6, 13, 9, 7, 11, 6, 8, 7, 8, 6, 12, 9, 14, 13, 7, 19, 10, 22, 14, 14, 14, 12, NA, 5, 6, 2, 3, 2, 6, 5, 4, 5, 2, 4, 3, 7, 5, 0, 3, 2, 4, 3, 4, 3, 4, 3, 2, 3, 4, 5, 2, 4, 10, 5, 10, 7, 8, 8, 8, 7, 10, 8, 11, 12, 6, 9, 8, 8, 9, 7, 8, 17, 11, 15, 20, 9, 9, 8, 16, 9, 16, 16, 7, 17, 17, 9, 15, 13, 21, 11, 14, 17, 14, 22, 10, 19, 15, 13, 20, 22, 24, 14, 27, 15, 21, 26, 17, 13, 28, 25, 20, 25, 22, 28, 30, 32, 31, 32, 22, 31, 33, 32, 30, NA, 4, 3, 1, 4, 2, 0, 0, 6, 2, 1, 1, 3, 4, 3, 3, 2, 2, 3, 1, 4, 4, 4, 3, 3, 3, 2, 3, 2, 4, 6, 5, 7, 5, 2, 3, 2, 5, 6, 4, 5, 7, 4, 6, 4, 3, 3, 5, 7, 3, 1, 8, 5, 10, 7, 3, 4, 6, 5, 9, 4, 4, 17, 9, 5, 5, 6, 9, 6, 5, 8, 14, 14, 5, 9, 11, 8, 6, 11, 11, 9, 13, 9, 7, 9, 10, 17, 9, 8, 16, 14, 9, 10, 14, 8, 6, 15, 11, 15, 14, 17, NA, 0, 3, 4, 3, 4, 3, 2, 3, 3, 6, 3, 3, 2, 3, 6, 5, 8, 3, 4, 4, 1, 4, 3, 2, 3, 10, 4, 6, 6, 10, 8, 8, 8, 7, 12, 6, 6, 9, 11, 11, 6, 4, 10, 18, 12, 13, 12, 10, 13, 11, 14, 13, 17, 18, 16, 9, 14, 11, 10, 21, 16, 14, 16, 20, 20, 13, 15, 17, 22, 26, 17, 24, 23, 21, 21, 31, 21, 27, 22, 26, 31, 30, 26, 31, 40, 34, 28, 24, 38, 40, 40, 33, 27, 41, 39, 39, 31, 42, 44, 42, NA, 5, 3, 7, 2, 3, 3, 2, 8, 5, 2, 1, 3, 4, 1, 5, 7, 5, 5, 6, 4, 4, 4, 6, 6, 3, 4, 3, 3, 7, 6, 9, 5, 7, 8, 4, 11, 2, 11, 5, 6, 11, 11, 8, 6, 2, 6, 7, 7, 11, 11, 10, 12, 6, 9, 10, 14, 5, 10, 13, 11, 16, 8, 13, 10, 10, 8, 10, 14, 19, 14, 12, 15, 7, 16, 13, 6, 10, 25, 10, 25, 28, 19, 20, 18, 18, 14, 20, 20, 21, 17, 29, 23, 21, 27, 22, 13, 27, 27, 26, 23, NA, 3, 3, 2, 6, 4, 5, 3, 5, 6, 6, 6, 5, 6, 5, 8, 0, 6, 4, 6, 8, 4, 7, 11, 9, 7, 9, 7, 10, 7, 4, 7, 6, 7, 2, 9, 7, 8, 6, 9, 7, 10, 16, 11, 12, 6, 5, 18, 7, 9, 8, 11, 9, 17, 16, 13, 12, 11, 6, 11, 8, 22, 15, 6, 11, 11, 12, 12, 18, 18, 21, 16, 16, 28, 19, 15, 22, 20, 19, 24, 19, 15, 13, 16, 27, 21, 27, 22, 28, 27, 20, 20, 31, 20, 23, 34, 29, 22, 25, 33, 22, NA, 0, 3, 0, 2, 0, 1, 0, 2, 1, 1, 7, 1, 1, 3, 0, 2, 1, 0, 2, 0, 1, 2, 2, 2, 3, 0, 3, 0, 3, 3, 4, 2, 2, 2, 3, 6, 3, 3, 7, 4, 3, 5, 3, 4, 4, 1, 0, 5, 4, 0, 3, 4, 9, 4, 7, 4, 5, 2, 2, 3, 1, 3, 5, 7, 6, 6, 5, 3, 6, 1, 3, 5, 4, 6, 3, 6, 5, 5, 5, 8, 8, 6, 7, 8, 3, 7, 8, 10, 4, 6, 11, 11, 5, 8, 6, 4, 3, 5, 11, 10, NA, 5, 2, 2, 2, 2, 0, 1, 4, 2, 3, 4, 1, 1, 2, 2, 2, 6, 0, 6, 7, 7, 5, 3, 1, 2, 3, 1, 2, 6, 5, 3, 3, 9, 8, 5, 3, 10, 4, 4, 3, 4, 8, 5, 7, 10, 8, 4, 5, 8, 3, 5, 4, 6, 7, 3, 9, 5, 6, 10, 8, 9, 12, 10, 11, 9, 10, 8, 14, 5, 14, 4, 14, 17, 11, 7, 9, 13, 11, 11, 10, 18, 11, 12, 16, 11, 9, 20, 14, 22, 17, 17, 15, 19, 18, 13, 22, 17, 11, 15, 14, NA, 1, 3, 6, 4, 6, 2, 2, 6, 5, 1, 7, 7, 8, 1, 5, 7, 11, 2, 5, 5, 7, 4, 9, 8, 8, 6, 4, 7, 7, 3, 5, 6, 9, 8, 8, 7, 11, 12, 5, 7, 6, 9, 5, 7, 9, 8, 6, 10, 9, 17, 12, 7, 16, 12, 18, 16, 14, 18, 16, 23, 14, 15, 13, 16, 16, 9, 17, 15, 24, 21, 17, 18, 15, 11, 15, 18, 20, 17, 23, 27, 22, 28, 21, 25, 28, 25, 28, 25, 37, 37, 37, 28, 31, 28, 35, 28, 37, 40, 37, 36, NA, 2, 1, 4, 5, 2, 5, 2, 5, 10, 5, 5, 5, 5, 6, 5, 4, 4, 6, 6, 3, 3, 10, 4, 6, 8, 7, 7, 11, 11, 7, 12, 6, 11, 5, 6, 10, 11, 8, 6, 15, 8, 7, 17, 14, 9, 9, 17, 15, 16, 26, 20, 15, 19, 10, 17, 14, 19, 16, 19, 20, 18, 18, 24, 16, 23, 18, 34, 21, 23, 28, 25, 26, 37, 30, 26, 36, 25, 38, 28, 42, 32, 48, 42, 26, 29, 38, 40, 44, 44, 56, 41, 47, 63, 60, 41, 56, 56, 63, 52, 57, NA, 0, 1, 1, 1, 4, 1, 2, 0, 1, 3, 1, 5, 2, 2, 3, 6, 3, 3, 0, 4, 2, 3, 5, 8, 6, 4, 3, 1, 4, 7, 2, 9, 8, 3, 10, 8, 5, 8, 9, 10, 7, 8, 9, 4, 6, 5, 4, 7, 10, 3, 8, 10, 14, 6, 8, 6, 9, 13, 4, 11, 9, 8, 12, 13, 12, 12, 14, 16, 15, 13, 9, 8, 15, 14, 12, 24, 19, 13, 16, 12, 13, 12, 16, 19, 16, 17, 21, 21, 19, 18, 27, 25, 23, 22, 24, 20, 17, 14, 33, 24, NA, 0, 3, 0, 1, 1, 3, 1, 0, 3, 1, 1, 1, 1, 1, 0, 1, 1, 3, 2, 1, 0, 2, 2, 1, 0, 0, 1, 2, 0, 3, 0, 2, 0, 1, 0, 1, 2, 3, 4, 1, 4, 2, 4, 4, 3, 4, 2, 3, 6, 1, 2, 1, 1, 2, 2, 2, 3, 2, 3, 3, 3, 2, 1, 3, 11, 2, 4, 3, 3, 5, 4, 1, 3, 4, 5, 1, 6, 0, 4, 2, 0, 4, 2, 2, 2, 3, 4, 2, 3, 1, 2, 3, 5, 4, 1, 4, 2, 4, 6, 5, NA, 1, 0, 5, 0, 0, 3, 1, 4, 1, 5, 3, 2, 5, 2, 2, 3, 3, 7, 3, 3, 3, 1, 3, 2, 2, 2, 10, 4, 5, 6, 1, 5, 7, 5, 6, 6, 10, 10, 6, 7, 3, 10, 11, 11, 4, 6, 6, 5, 4, 9, 5, 11, 10, 10, 11, 7, 15, 17, 13, 13, 8, 17, 9, 21, 15, 16, 13, 15, 18, 13, 16, 16, 17, 15, 16, 17, 21, 18, 16, 16, 19, 27, 26, 25, 23, 15, 23, 21, 25, 21, 24, 24, 23, 29, 33, 44, 33, 32, 34, 35, NA, 3, 4, 2, 3, 3, 3, 4, 7, 9, 9, 3, 2, 5, 7, 4, 8, 2, 5, 5, 9, 2, 9, 11, 6, 7, 7, 6, 5, 7, 3, 13, 7, 6, 9, 11, 7, 8, 14, 14, 15, 10, 10, 10, 13, 21, 15, 12, 21, 11, 13, 15, 12, 15, 14, 19, 15, 19, 16, 23, 15, 21, 18, 24, 30, 29, 17, 17, 30, 30, 16, 27, 18, 26, 32, 23, 24, 28, 33, 32, 34, 27, 30, 47, 28, 37, 45, 36, 40, 49, 45, 43, 40, 55, 54, 55, 49, 58, 50, 49, 47, NA, 2, 4, 2, 3, 4, 2, 4, 3, 2, 4, 4, 5, 1, 3, 1, 2, 1, 4, 1, 1, 0, 2, 1, 1, 4, 5, 2, 4, 5, 2, 5, 3, 0, 2, 3, 4, 11, 3, 8, 8, 2, 1, 6, 4, 1, 3, 3, 8, 2, 4, 1, 9, 4, 6, 3, 2, 3, 9, 3, 5, 6, 4, 8, 4, 4, 5, 4, 6, 6, 8, 8, 7, 5, 5, 7, 4, 5, 8, 4, 8, 8, 10, 4, 5, 7, 9, 11, 6, 5, 6, 7, 8, 7, 11, 8, 6, 5, 7, 17, 13, NA, 1, 3, 1, 1, 3, 1, 2, 2, 2, 0, 3, 0, 2, 3, 1, 1, 2, 1, 3, 1, 4, 3, 5, 2, 3, 1, 1, 5, 2, 4, 5, 2, 2, 2, 7, 1, 4, 5, 5, 1, 2, 3, 6, 3, 4, 6, 8, 6, 4, 8, 7, 4, 3, 6, 7, 6, 4, 6, 6, 8, 6, 5, 4, 5, 7, 11, 7, 6, 4, 12, 5, 9, 10, 10, 8, 10, 9, 10, 6, 12, 10, 7, 5, 9, 8, 13, 9, 6, 12, 11, 11, 9, 8, 13, 12, 14, 6, 10, 13, 9, NA, 7, 7, 6, 2, 8, 8, 5, 5, 4, 2, 6, 6, 8, 4, 6, 9, 11, 11, 10, 9, 13, 9, 7, 13, 12, 9, 13, 8, 8, 15, 22, 14, 13, 17, 11, 25, 20, 21, 25, 33, 20, 24, 18, 26, 25, 27, 33, 29, 15, 29, 35, 33, 30, 17, 34, 39, 32, 38, 39, 35, 43, 63, 39, 42, 49, 41, 51, 41, 56, 45, 55, 66, 66, 67, 74, 84, 72, 69, 75, 77, 90, 94, 75, 91, 89, 104, 96, 117, 95, 102, 104, 130, 101, 129, 122, 143, 117, 139, 142, 145, NA, 2, 3, 2, 1, 2, 3, 2, 3, 4, 4, 2, 6, 1, 3, 2, 3, 2, 2, 4, 1, 4, 2, 4, 3, 4, 3, 4, 5, 4, 4, 6, 4, 3, 3, 5, 5, 5, 1, 8, 0, 3, 6, 8, 5, 6, 5, 6, 7, 7, 6, 3, 7, 9, 2, 3, 8, 4, 8, 13, 6, 7, 7, 6, 10, 8, 12, 10, 13, 8, 7, 11, 9, 7, 10, 4, 12, 9, 6, 5, 9, 17, 9, 5, 20, 13, 13, 10, 9, 19, 10, 13, 10, 20, 14, 15, 13, 9, 9, 20, 17, NA, 0, 2, 2, 1, 3, 2, 3, 3, 3, 4, 3, 5, 3, 4, 2, 5, 3, 4, 4, 2, 2, 5, 2, 5, 3, 4, 5, 1, 2, 5, 1, 3, 7, 3, 5, 4, 6, 4, 6, 4, 4, 2, 7, 3, 8, 4, 9, 3, 7, 7, 11, 5, 4, 6, 5, 6, 7, 6, 4, 4, 7, 7, 8, 2, 8, 8, 8, 11, 6, 13, 8, 6, 15, 12, 8, 8, 11, 15, 9, 12, 15, 15, 12, 8, 18, 14, 15, 22, 15, 17, 15, 16, 13, 10, 12, 19, 12, 29, 17, 12)), data_windows = list(ts = 1:20, start = c(3L, 6L, 2L, 4L, 5L, 3L, 4L, 11L, 4L, 4L, 4L, 9L, 9L, 8L, 4L, 4L, 7L, 2L, 6L, 7L), end = c(100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100)), formula_priors = list(beta[3L] ~ Normal(mu = qlogis(p), sigma = 0.05), theta[3L] ~ Normal(mu = log(s), sigma = 0.25), Sigma ~ LKJ(eta = 2)))
23: do.call(egf, args)
24: egf.simulate.egf_model(zz, formula_priors = list(beta[3L] ~ Normal(mu = qlogis(p), sigma = 0.05), theta[3L] ~ Normal(mu = log(s), sigma = 0.25), Sigma ~ LKJ(eta = 2)))
25: egf(zz, formula_priors = list(beta[3L] ~ Normal(mu = qlogis(p), sigma = 0.05), theta[3L] ~ Normal(mu = log(s), sigma = 0.25), Sigma ~ LKJ(eta = 2)))
An irrecoverable exception occurred. R is aborting now ...
Running the tests in ‘tests/egf_utils.R’ failed.
Complete output:
> attach(asNamespace("epigrowthfit"))
> library(methods)
> library(tools)
> options(warn = 2L, error = if (interactive()) recover)
> example("egf", package = "epigrowthfit"); o.1 <- m1; o.2 <- m2
egf> ## Simulate 'N' incidence time series exhibiting exponential growth
egf> set.seed(180149L)
egf> N <- 10L
egf> f <- function(time, r, c0) {
egf+ lambda <- diff(exp(log(c0) + r * time))
egf+ c(NA, rpois(lambda, lambda))
egf+ }
egf> time <- seq.int(0, 40, 1)
egf> r <- rlnorm(N, -3.2, 0.2)
egf> c0 <- rlnorm(N, 6, 0.2)
egf> data_ts <-
egf+ data.frame(country = gl(N, length(time), labels = LETTERS[1:N]),
egf+ time = rep.int(time, N),
egf+ x = unlist(Map(f, time = list(time), r = r, c0 = c0)))
egf> rm(f, time)
egf> ## Define fitting windows (here, two per time series)
egf> data_windows <-
egf+ data.frame(country = gl(N, 1L, 2L * N, labels = LETTERS[1:N]),
egf+ wave = gl(2L, 10L),
egf+ start = c(sample(seq.int(0, 5, 1), N, TRUE),
egf+ sample(seq.int(20, 25, 1), N, TRUE)),
egf+ end = c(sample(seq.int(15, 20, 1), N, TRUE),
egf+ sample(seq.int(35, 40, 1), N, TRUE)))
egf> ## Estimate the generative model
egf> m1 <-
egf+ egf(model = egf_model(curve = "exponential", family = "pois"),
egf+ formula_ts = cbind(time, x) ~ country,
egf+ formula_windows = cbind(start, end) ~ country,
egf+ formula_parameters = ~(1 | country:wave),
egf+ data_ts = data_ts,
egf+ data_windows = data_windows,
egf+ se = TRUE)
computing a Hessian matrix ...
egf> ## Re-estimate the generative model with:
egf> ## * Gaussian prior on beta[1L]
egf> ## * LKJ prior on all random effect covariance matrices
egf> ## (here there happens to be just one)
egf> ## * initial value of 'theta' set explicitly
egf> ## * theta[3L] fixed at initial value
egf> m2 <-
egf+ update(m1,
egf+ formula_priors = list(beta[1L] ~ Normal(mu = -3, sigma = 1),
egf+ Sigma ~ LKJ(eta = 2)),
egf+ init = list(theta = c(log(0.5), log(0.5), 0)),
egf+ map = list(theta = 3L))
computing a Hessian matrix ...
>
>
> ## egf_sanitize_formula_ts ########################################
> ## egf_sanitize_formula_windows ########################################
>
> l1 <- list(cbind(x, y) ~ 1,
+ cbind(x, y) ~ g,
+ cbind(x, y) ~ 1 + g,
+ cbind(x, y) ~ (g),
+ cbind(x, y) ~ g:h,
+ cbind(x, y) ~ I(g + h),
+ cbind(x, y) ~ I(g * h),
+ cbind(x - 1, cumsum(y)) ~ g)
> l2 <- list(~g,
+ cbind(x, y) ~ g + h,
+ cbind(x, y) ~ g * h,
+ cbind(x, y) ~ 0 + g,
+ cbind(x, y) ~ g - 1,
+ cbind(x, y) ~ offset(h) + g,
+ (cbind(x, y)) ~ g,
+ cbind(x) ~ g,
+ cbind(x, y, z) ~ g,
+ rbind(x, y) ~ g) # i.e., anything other than 'cbind'
>
> stopifnot(identical(lapply(l1, egf_sanitize_formula_ts),
+ l1[c(1L, 2L, 2L, 2L, 5:8)]))
> for (formula in l2)
+ assertError(egf_sanitize_formula_ts(formula))
>
>
> ## egf_sanitize_formula_parameters #####################################
>
> model <- egf_model(curve = "exponential", family = "pois")
> top <- egf_top(model)
>
> s <-
+ function(formula)
+ egf_sanitize_formula_parameters(formula, top, check = TRUE)
>
> fp1 <- ~x * y + (z | g) + (zz | g/h)
> l1 <- rep.int(expr(simplify_terms(fp1)), 2L)
> names(l1) <- c("log(r)", "log(c0)")
>
> fp2 <- expr(replace(fp1, 2:3, expr(quote(log(r)), fp1[[2L]])))
> l2 <- replace(l1, "log(c0)", expr(~1))
>
> fp3 <- c(fp2, expr(log(c0) ~ x))
> l3 <- replace(l2, "log(c0)", expr(~x))
>
> stopifnot(exprs = {
+ identical(s(fp1), l1)
+ identical(s(fp2), l2)
+ identical(s(fp3), l3)
+ })
> assertWarning(s(~0 + x))
>
>
> ## egf_sanitize_formula_priors #########################################
>
> p1 <- Normal(mu = 0, sigma = 1)
> p2 <- Normal(mu = 1, sigma = c(0.5, 1))
> p3 <- Normal(mu = -1, sigma = 2)
> p4 <- LKJ(eta = 1)
>
> fp. <- list(foo(bar) ~ p1,
+ baz ~ p1,
+ beta ~ p1,
+ theta[[1L]] ~ p1,
+ theta[2:3] ~ p2,
+ theta[-(1:5)] ~ p3,
+ theta[replace(logical(6L), 4L, TRUE)] ~ p1,
+ Sigma ~ p4)
>
> ip. <- list(
+ top = list(names = c("foo(bar)", "baz"), family = "norm"),
+ bottom = list(
+ beta = list(length = 4L, family = "norm"),
+ theta = list(length = 6L, family = "norm"),
+ Sigma = list(length = 1L, family = c("lkj", "wishart", "invwishart"),
+ rows = 4L)))
>
> priors <- egf_sanitize_formula_priors(formula = fp., info = ip.)
>
> p2.elt <-
+ function(i) {
+ p2[["parameters"]][["sigma"]] <- p2[["parameters"]][["sigma"]][[i]]
+ p2
+ }
>
> stopifnot(exprs = {
+ is.list(priors)
+ length(priors) == 2L
+ identical(names(priors), c("top", "bottom"))
+
+ identical(priors[["top"]],
+ `names<-`(list(p1, p1), ip.[["top"]][["names"]]))
+ identical(priors[["bottom"]],
+ list(beta = list(p1, p1, p1, p1),
+ theta = list(p1, p2.elt(1L), p2.elt(2L), p1, NULL, p3),
+ Sigma = list(p4)))
+ })
>
>
> ## egf_make_frame ######################################################
>
> model <- egf_model(curve = "exponential", family = "pois")
>
> formula_ts <- cbind(day, count) ~ country
> formula_windows <- cbind(left, right) ~ country
> formula_parameters <- list(`log(r)` = ~x1 + (1 | g1) + (1 | g1:g2),
+ `log(c0)` = ~(1 | g3))
>
> data_ts <- data.frame(country = gl(6L, 11L),
+ day = seq.int(0, 10, by = 1),
+ count = rpois(11L, 100 * exp(0.04 * 0:10)))
> data_windows <- data.frame(country = gl(3L, 2L),
+ left = rep.int(c(0, 5), 3L),
+ right = rep.int(c(5, 10), 3L),
+ x1 = c(5.00, 8.34, -0.57, -7.19, -9.71, 1.25),
+ x2 = rnorm(6L),
+ x3 = rnorm(6L),
+ g1 = c("a", "b", "b", "b", "b", "a"),
+ g2 = c("c", "d", "d", "d", "c", "c"),
+ g3 = c("f", "f", "e", "e", "e", "f"))
>
> subset_ts <- quote(day > 0)
> subset_windows <- quote(x1 < 0)
> select_windows <- quote(.)
>
> na_action_ts <- "pass"
> na_action_windows <- "omit"
>
> frame <- egf_make_frame(model = model,
+ formula_ts = formula_ts,
+ formula_windows = formula_windows,
+ formula_parameters = formula_parameters,
+ data_ts = data_ts,
+ data_windows = data_windows,
+ subset_ts = subset_ts,
+ subset_windows = subset_windows,
+ select_windows = select_windows,
+ na_action_ts = na_action_ts,
+ na_action_windows = na_action_windows)
>
> stopifnot(exprs = {
+ is.list(frame)
+ length(frame) == 4L
+ identical(names(frame), c("ts", "windows", "parameters", "extra"))
+ })
>
> l1 <- frame[["ts"]]
> l1.e <- data.frame(ts = gl(2L, 10L, labels = 2:3),
+ window = factor(rep.int(c(NA, 1, 2, NA, 3, NA),
+ c(1L, 4L, 5L, 1L, 4L, 5L)),
+ labels = sprintf("window_%d", 1:3)),
+ time = rep.int(seq.int(1, 10, by = 1), 2L),
+ x = data_ts[["count"]][c(NA, 14:22, NA, 25:33)])
> attr(l1.e, "first") <- c(1L, 5L, 11L)
> attr(l1.e, "last") <- c(5L, 10L, 15L)
> stopifnot(identical(l1, l1.e))
>
> l2 <- frame[["windows"]]
> l2.e <- data.frame(ts = factor(c(2, 2, 3)),
+ window = gl(3L, 1L, labels = sprintf("window_%d", 1:3)),
+ start = c(1, 5, 1),
+ end = c(5, 10, 5))
> stopifnot(identical(l2, l2.e))
Error: identical(l2, l2.e) is not TRUE
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 0.15.3
Check: tests
Result: ERROR
Running ‘coef.R’
Running ‘confint.R’ [34s/43s]
Running ‘datetime.R’
Running ‘egf.R’
Running ‘egf_enum.R’
Running ‘egf_eval.R’
Running ‘egf_examples_day_of_week.R’
Running ‘egf_examples_excess.R’
Running ‘egf_examples_fixed.R’
Running ‘egf_examples_random.R’ [56s/31s]
Running ‘egf_link.R’
Running ‘egf_misc.R’
Running ‘egf_options.R’
Running ‘egf_utils.R’
Running ‘epidemic.R’
Running ‘extract.R’
Running ‘fitted.R’
Running ‘gi.R’
Running ‘include.R’ [151s/152s]
Running ‘language.R’
Running ‘prior.R’
Running ‘profile.R’ [17s/25s]
Running ‘summary.R’
Running ‘utils.R’
Running ‘validity.R’
Running ‘zzz.R’
Running the tests in ‘tests/egf_examples_random.R’ failed.
Complete output:
> library(epigrowthfit)
> options(warn = 2L, error = if (interactive()) recover, egf.cores = 2L)
>
>
> ## exponential #########################################################
>
> r <- log(2) / 20
> c0 <- 100
> s <- 0.2
>
> mu <- log(c(r, c0))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "exponential", family = "pois"),
+ nsim = 20L,
+ seed = 775494L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-05
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 5e-02)
+ })
>
>
> ## subexponential ######################################################
>
> alpha <- log(2) / 20
> c0 <- 100
> p <- 0.95
> s <- 0.2
>
> mu <- c(log(alpha), log(c0), qlogis(p))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "subexponential", family = "pois"),
+ nsim = 20L,
+ seed = 653927L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(beta[3L] ~ Normal(mu = qlogis(p), sigma = 0.05),
+ theta[3L] ~ Normal(mu = log(s), sigma = 0.25),
+ Sigma ~ LKJ(eta = 2)))
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-04
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 2e-02)
+ })
>
>
> ## gompertz ############################################################
>
> alpha <- log(2) / 20
> tinfl <- 100
> K <- 25000
> s <- 0.2
>
> mu <- log(c(alpha, tinfl, K))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "gompertz", family = "pois"),
+ nsim = 20L,
+ seed = 685399L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> oo <- options(warn = 1L) # FIXME: diagnose NA/NaN function evaluation
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
Warning in nlminb(start = par, objective = fn, gradient = gr, control = control, :
NA/NaN function evaluation
> options(oo)
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-04
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 2e-02)
+ })
>
>
> ## logistic ############################################################
>
> r <- log(2) / 20
> tinfl <- 100
> K <- 25000
> s <- 0.2
>
> mu <- log(c(r, tinfl, K))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "logistic", family = "pois"),
+ nsim = 20L,
+ seed = 397981L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 1e-02
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 1e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 2e-02)
+ })
Error: max(abs(mm[["gradient"]])) < 0.01 is not TRUE
Execution halted
Running the tests in ‘tests/egf_utils.R’ failed.
Complete output:
> attach(asNamespace("epigrowthfit"))
> library(methods)
> library(tools)
> options(warn = 2L, error = if (interactive()) recover)
> example("egf", package = "epigrowthfit"); o.1 <- m1; o.2 <- m2
egf> ## Simulate 'N' incidence time series exhibiting exponential growth
egf> set.seed(180149L)
egf> N <- 10L
egf> f <- function(time, r, c0) {
egf+ lambda <- diff(exp(log(c0) + r * time))
egf+ c(NA, rpois(lambda, lambda))
egf+ }
egf> time <- seq.int(0, 40, 1)
egf> r <- rlnorm(N, -3.2, 0.2)
egf> c0 <- rlnorm(N, 6, 0.2)
egf> data_ts <-
egf+ data.frame(country = gl(N, length(time), labels = LETTERS[1:N]),
egf+ time = rep.int(time, N),
egf+ x = unlist(Map(f, time = list(time), r = r, c0 = c0)))
egf> rm(f, time)
egf> ## Define fitting windows (here, two per time series)
egf> data_windows <-
egf+ data.frame(country = gl(N, 1L, 2L * N, labels = LETTERS[1:N]),
egf+ wave = gl(2L, 10L),
egf+ start = c(sample(seq.int(0, 5, 1), N, TRUE),
egf+ sample(seq.int(20, 25, 1), N, TRUE)),
egf+ end = c(sample(seq.int(15, 20, 1), N, TRUE),
egf+ sample(seq.int(35, 40, 1), N, TRUE)))
egf> ## Estimate the generative model
egf> m1 <-
egf+ egf(model = egf_model(curve = "exponential", family = "pois"),
egf+ formula_ts = cbind(time, x) ~ country,
egf+ formula_windows = cbind(start, end) ~ country,
egf+ formula_parameters = ~(1 | country:wave),
egf+ data_ts = data_ts,
egf+ data_windows = data_windows,
egf+ se = TRUE)
computing a Hessian matrix ...
egf> ## Re-estimate the generative model with:
egf> ## * Gaussian prior on beta[1L]
egf> ## * LKJ prior on all random effect covariance matrices
egf> ## (here there happens to be just one)
egf> ## * initial value of 'theta' set explicitly
egf> ## * theta[3L] fixed at initial value
egf> m2 <-
egf+ update(m1,
egf+ formula_priors = list(beta[1L] ~ Normal(mu = -3, sigma = 1),
egf+ Sigma ~ LKJ(eta = 2)),
egf+ init = list(theta = c(log(0.5), log(0.5), 0)),
egf+ map = list(theta = 3L))
computing a Hessian matrix ...
>
>
> ## egf_sanitize_formula_ts ########################################
> ## egf_sanitize_formula_windows ########################################
>
> l1 <- list(cbind(x, y) ~ 1,
+ cbind(x, y) ~ g,
+ cbind(x, y) ~ 1 + g,
+ cbind(x, y) ~ (g),
+ cbind(x, y) ~ g:h,
+ cbind(x, y) ~ I(g + h),
+ cbind(x, y) ~ I(g * h),
+ cbind(x - 1, cumsum(y)) ~ g)
> l2 <- list(~g,
+ cbind(x, y) ~ g + h,
+ cbind(x, y) ~ g * h,
+ cbind(x, y) ~ 0 + g,
+ cbind(x, y) ~ g - 1,
+ cbind(x, y) ~ offset(h) + g,
+ (cbind(x, y)) ~ g,
+ cbind(x) ~ g,
+ cbind(x, y, z) ~ g,
+ rbind(x, y) ~ g) # i.e., anything other than 'cbind'
>
> stopifnot(identical(lapply(l1, egf_sanitize_formula_ts),
+ l1[c(1L, 2L, 2L, 2L, 5:8)]))
> for (formula in l2)
+ assertError(egf_sanitize_formula_ts(formula))
>
>
> ## egf_sanitize_formula_parameters #####################################
>
> model <- egf_model(curve = "exponential", family = "pois")
> top <- egf_top(model)
>
> s <-
+ function(formula)
+ egf_sanitize_formula_parameters(formula, top, check = TRUE)
>
> fp1 <- ~x * y + (z | g) + (zz | g/h)
> l1 <- rep.int(expr(simplify_terms(fp1)), 2L)
> names(l1) <- c("log(r)", "log(c0)")
>
> fp2 <- expr(replace(fp1, 2:3, expr(quote(log(r)), fp1[[2L]])))
> l2 <- replace(l1, "log(c0)", expr(~1))
>
> fp3 <- c(fp2, expr(log(c0) ~ x))
> l3 <- replace(l2, "log(c0)", expr(~x))
>
> stopifnot(exprs = {
+ identical(s(fp1), l1)
+ identical(s(fp2), l2)
+ identical(s(fp3), l3)
+ })
> assertWarning(s(~0 + x))
>
>
> ## egf_sanitize_formula_priors #########################################
>
> p1 <- Normal(mu = 0, sigma = 1)
> p2 <- Normal(mu = 1, sigma = c(0.5, 1))
> p3 <- Normal(mu = -1, sigma = 2)
> p4 <- LKJ(eta = 1)
>
> fp. <- list(foo(bar) ~ p1,
+ baz ~ p1,
+ beta ~ p1,
+ theta[[1L]] ~ p1,
+ theta[2:3] ~ p2,
+ theta[-(1:5)] ~ p3,
+ theta[replace(logical(6L), 4L, TRUE)] ~ p1,
+ Sigma ~ p4)
>
> ip. <- list(
+ top = list(names = c("foo(bar)", "baz"), family = "norm"),
+ bottom = list(
+ beta = list(length = 4L, family = "norm"),
+ theta = list(length = 6L, family = "norm"),
+ Sigma = list(length = 1L, family = c("lkj", "wishart", "invwishart"),
+ rows = 4L)))
>
> priors <- egf_sanitize_formula_priors(formula = fp., info = ip.)
>
> p2.elt <-
+ function(i) {
+ p2[["parameters"]][["sigma"]] <- p2[["parameters"]][["sigma"]][[i]]
+ p2
+ }
>
> stopifnot(exprs = {
+ is.list(priors)
+ length(priors) == 2L
+ identical(names(priors), c("top", "bottom"))
+
+ identical(priors[["top"]],
+ `names<-`(list(p1, p1), ip.[["top"]][["names"]]))
+ identical(priors[["bottom"]],
+ list(beta = list(p1, p1, p1, p1),
+ theta = list(p1, p2.elt(1L), p2.elt(2L), p1, NULL, p3),
+ Sigma = list(p4)))
+ })
>
>
> ## egf_make_frame ######################################################
>
> model <- egf_model(curve = "exponential", family = "pois")
>
> formula_ts <- cbind(day, count) ~ country
> formula_windows <- cbind(left, right) ~ country
> formula_parameters <- list(`log(r)` = ~x1 + (1 | g1) + (1 | g1:g2),
+ `log(c0)` = ~(1 | g3))
>
> data_ts <- data.frame(country = gl(6L, 11L),
+ day = seq.int(0, 10, by = 1),
+ count = rpois(11L, 100 * exp(0.04 * 0:10)))
> data_windows <- data.frame(country = gl(3L, 2L),
+ left = rep.int(c(0, 5), 3L),
+ right = rep.int(c(5, 10), 3L),
+ x1 = c(5.00, 8.34, -0.57, -7.19, -9.71, 1.25),
+ x2 = rnorm(6L),
+ x3 = rnorm(6L),
+ g1 = c("a", "b", "b", "b", "b", "a"),
+ g2 = c("c", "d", "d", "d", "c", "c"),
+ g3 = c("f", "f", "e", "e", "e", "f"))
>
> subset_ts <- quote(day > 0)
> subset_windows <- quote(x1 < 0)
> select_windows <- quote(.)
>
> na_action_ts <- "pass"
> na_action_windows <- "omit"
>
> frame <- egf_make_frame(model = model,
+ formula_ts = formula_ts,
+ formula_windows = formula_windows,
+ formula_parameters = formula_parameters,
+ data_ts = data_ts,
+ data_windows = data_windows,
+ subset_ts = subset_ts,
+ subset_windows = subset_windows,
+ select_windows = select_windows,
+ na_action_ts = na_action_ts,
+ na_action_windows = na_action_windows)
>
> stopifnot(exprs = {
+ is.list(frame)
+ length(frame) == 4L
+ identical(names(frame), c("ts", "windows", "parameters", "extra"))
+ })
>
> l1 <- frame[["ts"]]
> l1.e <- data.frame(ts = gl(2L, 10L, labels = 2:3),
+ window = factor(rep.int(c(NA, 1, 2, NA, 3, NA),
+ c(1L, 4L, 5L, 1L, 4L, 5L)),
+ labels = sprintf("window_%d", 1:3)),
+ time = rep.int(seq.int(1, 10, by = 1), 2L),
+ x = data_ts[["count"]][c(NA, 14:22, NA, 25:33)])
> attr(l1.e, "first") <- c(1L, 5L, 11L)
> attr(l1.e, "last") <- c(5L, 10L, 15L)
> stopifnot(identical(l1, l1.e))
>
> l2 <- frame[["windows"]]
> l2.e <- data.frame(ts = factor(c(2, 2, 3)),
+ window = gl(3L, 1L, labels = sprintf("window_%d", 1:3)),
+ start = c(1, 5, 1),
+ end = c(5, 10, 5))
> stopifnot(identical(l2, l2.e))
Error: identical(l2, l2.e) is not TRUE
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 0.15.3
Check: tests
Result: ERROR
Running 'coef.R' [5s]
Running 'confint.R' [52s]
Running 'datetime.R' [2s]
Running 'egf.R' [5s]
Running 'egf_enum.R' [2s]
Running 'egf_eval.R' [2s]
Running 'egf_examples_day_of_week.R' [2s]
Running 'egf_examples_excess.R' [2s]
Running 'egf_examples_fixed.R' [2s]
Running 'egf_examples_random.R' [32s]
Running 'egf_link.R' [2s]
Running 'egf_misc.R' [6s]
Running 'egf_options.R' [2s]
Running 'egf_utils.R' [6s]
Running 'epidemic.R' [2s]
Running 'extract.R' [5s]
Running 'fitted.R' [5s]
Running 'gi.R' [2s]
Running 'include.R' [94s]
Running 'language.R' [2s]
Running 'prior.R' [2s]
Running 'profile.R' [37s]
Running 'summary.R' [5s]
Running 'utils.R' [2s]
Running 'validity.R' [2s]
Running 'zzz.R' [2s]
Running the tests in 'tests/egf_examples_random.R' failed.
Complete output:
> library(epigrowthfit)
> options(warn = 2L, error = if (interactive()) recover, egf.cores = 2L)
>
>
> ## exponential #########################################################
>
> r <- log(2) / 20
> c0 <- 100
> s <- 0.2
>
> mu <- log(c(r, c0))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "exponential", family = "pois"),
+ nsim = 20L,
+ seed = 775494L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-05
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 5e-02)
+ })
>
>
> ## subexponential ######################################################
>
> alpha <- log(2) / 20
> c0 <- 100
> p <- 0.95
> s <- 0.2
>
> mu <- c(log(alpha), log(c0), qlogis(p))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "subexponential", family = "pois"),
+ nsim = 20L,
+ seed = 653927L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(beta[3L] ~ Normal(mu = qlogis(p), sigma = 0.05),
+ theta[3L] ~ Normal(mu = log(s), sigma = 0.25),
+ Sigma ~ LKJ(eta = 2)))
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-04
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 2e-02)
+ })
>
>
> ## gompertz ############################################################
>
> alpha <- log(2) / 20
> tinfl <- 100
> K <- 25000
> s <- 0.2
>
> mu <- log(c(alpha, tinfl, K))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "gompertz", family = "pois"),
+ nsim = 20L,
+ seed = 685399L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> oo <- options(warn = 1L) # FIXME: diagnose NA/NaN function evaluation
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
Warning in nlminb(start = par, objective = fn, gradient = gr, control = control, :
NA/NaN function evaluation
> options(oo)
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-04
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 2e-02)
+ })
>
>
> ## logistic ############################################################
>
> r <- log(2) / 20
> tinfl <- 100
> K <- 25000
> s <- 0.2
>
> mu <- log(c(r, tinfl, K))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "logistic", family = "pois"),
+ nsim = 20L,
+ seed = 397981L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
Running the tests in 'tests/egf_utils.R' failed.
Complete output:
> attach(asNamespace("epigrowthfit"))
> library(methods)
> library(tools)
> options(warn = 2L, error = if (interactive()) recover)
> example("egf", package = "epigrowthfit"); o.1 <- m1; o.2 <- m2
egf> ## Simulate 'N' incidence time series exhibiting exponential growth
egf> set.seed(180149L)
egf> N <- 10L
egf> f <- function(time, r, c0) {
egf+ lambda <- diff(exp(log(c0) + r * time))
egf+ c(NA, rpois(lambda, lambda))
egf+ }
egf> time <- seq.int(0, 40, 1)
egf> r <- rlnorm(N, -3.2, 0.2)
egf> c0 <- rlnorm(N, 6, 0.2)
egf> data_ts <-
egf+ data.frame(country = gl(N, length(time), labels = LETTERS[1:N]),
egf+ time = rep.int(time, N),
egf+ x = unlist(Map(f, time = list(time), r = r, c0 = c0)))
egf> rm(f, time)
egf> ## Define fitting windows (here, two per time series)
egf> data_windows <-
egf+ data.frame(country = gl(N, 1L, 2L * N, labels = LETTERS[1:N]),
egf+ wave = gl(2L, 10L),
egf+ start = c(sample(seq.int(0, 5, 1), N, TRUE),
egf+ sample(seq.int(20, 25, 1), N, TRUE)),
egf+ end = c(sample(seq.int(15, 20, 1), N, TRUE),
egf+ sample(seq.int(35, 40, 1), N, TRUE)))
egf> ## Estimate the generative model
egf> m1 <-
egf+ egf(model = egf_model(curve = "exponential", family = "pois"),
egf+ formula_ts = cbind(time, x) ~ country,
egf+ formula_windows = cbind(start, end) ~ country,
egf+ formula_parameters = ~(1 | country:wave),
egf+ data_ts = data_ts,
egf+ data_windows = data_windows,
egf+ se = TRUE)
computing a Hessian matrix ...
egf> ## Re-estimate the generative model with:
egf> ## * Gaussian prior on beta[1L]
egf> ## * LKJ prior on all random effect covariance matrices
egf> ## (here there happens to be just one)
egf> ## * initial value of 'theta' set explicitly
egf> ## * theta[3L] fixed at initial value
egf> m2 <-
egf+ update(m1,
egf+ formula_priors = list(beta[1L] ~ Normal(mu = -3, sigma = 1),
egf+ Sigma ~ LKJ(eta = 2)),
egf+ init = list(theta = c(log(0.5), log(0.5), 0)),
egf+ map = list(theta = 3L))
computing a Hessian matrix ...
>
>
> ## egf_sanitize_formula_ts ########################################
> ## egf_sanitize_formula_windows ########################################
>
> l1 <- list(cbind(x, y) ~ 1,
+ cbind(x, y) ~ g,
+ cbind(x, y) ~ 1 + g,
+ cbind(x, y) ~ (g),
+ cbind(x, y) ~ g:h,
+ cbind(x, y) ~ I(g + h),
+ cbind(x, y) ~ I(g * h),
+ cbind(x - 1, cumsum(y)) ~ g)
> l2 <- list(~g,
+ cbind(x, y) ~ g + h,
+ cbind(x, y) ~ g * h,
+ cbind(x, y) ~ 0 + g,
+ cbind(x, y) ~ g - 1,
+ cbind(x, y) ~ offset(h) + g,
+ (cbind(x, y)) ~ g,
+ cbind(x) ~ g,
+ cbind(x, y, z) ~ g,
+ rbind(x, y) ~ g) # i.e., anything other than 'cbind'
>
> stopifnot(identical(lapply(l1, egf_sanitize_formula_ts),
+ l1[c(1L, 2L, 2L, 2L, 5:8)]))
> for (formula in l2)
+ assertError(egf_sanitize_formula_ts(formula))
>
>
> ## egf_sanitize_formula_parameters #####################################
>
> model <- egf_model(curve = "exponential", family = "pois")
> top <- egf_top(model)
>
> s <-
+ function(formula)
+ egf_sanitize_formula_parameters(formula, top, check = TRUE)
>
> fp1 <- ~x * y + (z | g) + (zz | g/h)
> l1 <- rep.int(expr(simplify_terms(fp1)), 2L)
> names(l1) <- c("log(r)", "log(c0)")
>
> fp2 <- expr(replace(fp1, 2:3, expr(quote(log(r)), fp1[[2L]])))
> l2 <- replace(l1, "log(c0)", expr(~1))
>
> fp3 <- c(fp2, expr(log(c0) ~ x))
> l3 <- replace(l2, "log(c0)", expr(~x))
>
> stopifnot(exprs = {
+ identical(s(fp1), l1)
+ identical(s(fp2), l2)
+ identical(s(fp3), l3)
+ })
> assertWarning(s(~0 + x))
>
>
> ## egf_sanitize_formula_priors #########################################
>
> p1 <- Normal(mu = 0, sigma = 1)
> p2 <- Normal(mu = 1, sigma = c(0.5, 1))
> p3 <- Normal(mu = -1, sigma = 2)
> p4 <- LKJ(eta = 1)
>
> fp. <- list(foo(bar) ~ p1,
+ baz ~ p1,
+ beta ~ p1,
+ theta[[1L]] ~ p1,
+ theta[2:3] ~ p2,
+ theta[-(1:5)] ~ p3,
+ theta[replace(logical(6L), 4L, TRUE)] ~ p1,
+ Sigma ~ p4)
>
> ip. <- list(
+ top = list(names = c("foo(bar)", "baz"), family = "norm"),
+ bottom = list(
+ beta = list(length = 4L, family = "norm"),
+ theta = list(length = 6L, family = "norm"),
+ Sigma = list(length = 1L, family = c("lkj", "wishart", "invwishart"),
+ rows = 4L)))
>
> priors <- egf_sanitize_formula_priors(formula = fp., info = ip.)
>
> p2.elt <-
+ function(i) {
+ p2[["parameters"]][["sigma"]] <- p2[["parameters"]][["sigma"]][[i]]
+ p2
+ }
>
> stopifnot(exprs = {
+ is.list(priors)
+ length(priors) == 2L
+ identical(names(priors), c("top", "bottom"))
+
+ identical(priors[["top"]],
+ `names<-`(list(p1, p1), ip.[["top"]][["names"]]))
+ identical(priors[["bottom"]],
+ list(beta = list(p1, p1, p1, p1),
+ theta = list(p1, p2.elt(1L), p2.elt(2L), p1, NULL, p3),
+ Sigma = list(p4)))
+ })
>
>
> ## egf_make_frame ######################################################
>
> model <- egf_model(curve = "exponential", family = "pois")
>
> formula_ts <- cbind(day, count) ~ country
> formula_windows <- cbind(left, right) ~ country
> formula_parameters <- list(`log(r)` = ~x1 + (1 | g1) + (1 | g1:g2),
+ `log(c0)` = ~(1 | g3))
>
> data_ts <- data.frame(country = gl(6L, 11L),
+ day = seq.int(0, 10, by = 1),
+ count = rpois(11L, 100 * exp(0.04 * 0:10)))
> data_windows <- data.frame(country = gl(3L, 2L),
+ left = rep.int(c(0, 5), 3L),
+ right = rep.int(c(5, 10), 3L),
+ x1 = c(5.00, 8.34, -0.57, -7.19, -9.71, 1.25),
+ x2 = rnorm(6L),
+ x3 = rnorm(6L),
+ g1 = c("a", "b", "b", "b", "b", "a"),
+ g2 = c("c", "d", "d", "d", "c", "c"),
+ g3 = c("f", "f", "e", "e", "e", "f"))
>
> subset_ts <- quote(day > 0)
> subset_windows <- quote(x1 < 0)
> select_windows <- quote(.)
>
> na_action_ts <- "pass"
> na_action_windows <- "omit"
>
> frame <- egf_make_frame(model = model,
+ formula_ts = formula_ts,
+ formula_windows = formula_windows,
+ formula_parameters = formula_parameters,
+ data_ts = data_ts,
+ data_windows = data_windows,
+ subset_ts = subset_ts,
+ subset_windows = subset_windows,
+ select_windows = select_windows,
+ na_action_ts = na_action_ts,
+ na_action_windows = na_action_windows)
>
> stopifnot(exprs = {
+ is.list(frame)
+ length(frame) == 4L
+ identical(names(frame), c("ts", "windows", "parameters", "extra"))
+ })
>
> l1 <- frame[["ts"]]
> l1.e <- data.frame(ts = gl(2L, 10L, labels = 2:3),
+ window = factor(rep.int(c(NA, 1, 2, NA, 3, NA),
+ c(1L, 4L, 5L, 1L, 4L, 5L)),
+ labels = sprintf("window_%d", 1:3)),
+ time = rep.int(seq.int(1, 10, by = 1), 2L),
+ x = data_ts[["count"]][c(NA, 14:22, NA, 25:33)])
> attr(l1.e, "first") <- c(1L, 5L, 11L)
> attr(l1.e, "last") <- c(5L, 10L, 15L)
> stopifnot(identical(l1, l1.e))
>
> l2 <- frame[["windows"]]
> l2.e <- data.frame(ts = factor(c(2, 2, 3)),
+ window = gl(3L, 1L, labels = sprintf("window_%d", 1:3)),
+ start = c(1, 5, 1),
+ end = c(5, 10, 5))
> stopifnot(identical(l2, l2.e))
Error: identical(l2, l2.e) is not TRUE
Execution halted
Flavor: r-devel-windows-x86_64
Version: 0.15.3
Check: installed package size
Result: NOTE
installed size is 94.3Mb
sub-directories of 1Mb or more:
libs 93.7Mb
Flavors: r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64
Version: 0.15.3
Check: tests
Result: ERROR
Running 'coef.R' [5s]
Running 'confint.R' [52s]
Running 'datetime.R' [2s]
Running 'egf.R' [5s]
Running 'egf_enum.R' [2s]
Running 'egf_eval.R' [1s]
Running 'egf_examples_day_of_week.R' [2s]
Running 'egf_examples_excess.R' [2s]
Running 'egf_examples_fixed.R' [2s]
Running 'egf_examples_random.R' [31s]
Running 'egf_link.R' [2s]
Running 'egf_misc.R' [6s]
Running 'egf_options.R' [2s]
Running 'egf_utils.R' [6s]
Running 'epidemic.R' [2s]
Running 'extract.R' [5s]
Running 'fitted.R' [5s]
Running 'gi.R' [2s]
Running 'include.R' [94s]
Running 'language.R' [2s]
Running 'prior.R' [2s]
Running 'profile.R' [37s]
Running 'summary.R' [5s]
Running 'utils.R' [2s]
Running 'validity.R' [1s]
Running 'zzz.R' [1s]
Running the tests in 'tests/egf_examples_random.R' failed.
Complete output:
> library(epigrowthfit)
> options(warn = 2L, error = if (interactive()) recover, egf.cores = 2L)
>
>
> ## exponential #########################################################
>
> r <- log(2) / 20
> c0 <- 100
> s <- 0.2
>
> mu <- log(c(r, c0))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "exponential", family = "pois"),
+ nsim = 20L,
+ seed = 775494L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-05
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 5e-02)
+ })
>
>
> ## subexponential ######################################################
>
> alpha <- log(2) / 20
> c0 <- 100
> p <- 0.95
> s <- 0.2
>
> mu <- c(log(alpha), log(c0), qlogis(p))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "subexponential", family = "pois"),
+ nsim = 20L,
+ seed = 653927L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(beta[3L] ~ Normal(mu = qlogis(p), sigma = 0.05),
+ theta[3L] ~ Normal(mu = log(s), sigma = 0.25),
+ Sigma ~ LKJ(eta = 2)))
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-04
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 2e-02)
+ })
>
>
> ## gompertz ############################################################
>
> alpha <- log(2) / 20
> tinfl <- 100
> K <- 25000
> s <- 0.2
>
> mu <- log(c(alpha, tinfl, K))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "gompertz", family = "pois"),
+ nsim = 20L,
+ seed = 685399L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> oo <- options(warn = 1L) # FIXME: diagnose NA/NaN function evaluation
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
Warning in nlminb(start = par, objective = fn, gradient = gr, control = control, :
NA/NaN function evaluation
> options(oo)
>
> p1 <- as.list(coef(zz))
> p2 <- as.list(coef(mm))
>
> stopifnot(exprs = {
+ max(abs(mm[["gradient"]])) < 5e-04
+ all.equal(p1[["beta"]], p2[["beta"]], tolerance = 5e-02)
+ all.equal(theta2cov(p1[["theta"]]), theta2cov(p2[["theta"]]), tolerance = 2e-02)
+ })
>
>
> ## logistic ############################################################
>
> r <- log(2) / 20
> tinfl <- 100
> K <- 25000
> s <- 0.2
>
> mu <- log(c(r, tinfl, K))
> Sigma <- diag(rep.int(s^2, length(mu)))
>
> zz <- simulate(egf_model(curve = "logistic", family = "pois"),
+ nsim = 20L,
+ seed = 397981L,
+ mu = mu,
+ Sigma = Sigma,
+ cstart = 10)
> mm <- egf(zz,
+ formula_priors = list(Sigma ~ LKJ(eta = 2)))
Flavor: r-release-windows-x86_64