- using R version 4.6.2 (2026-10-29 ucrt)
- using platform: x86_64-w64-mingw32
- R was compiled by
gcc.exe (GCC) 14.3.0
GNU Fortran (GCC) 14.3.0
- running under: Windows Server 2022 x64 (build 20348)
- using session charset: UTF-8
* current time: 2026-11-23 18:32:06 UTC
- checking for file 'sparsesurv/DESCRIPTION' ... OK
- this is package 'sparsesurv' version '0.1.1'
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking whether package 'sparsesurv' can be installed ... OK
See the install log for details.
- checking installed package size ... OK
- checking package directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s] OK
- checking whether the package can be unloaded cleanly ... [1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s] OK
- checking loading without being on the library search path ... [1s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [5s] OK
- checking Rd files ... [1s] OK
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking examples ... [7s] ERROR
Running examples in 'sparsesurv-Ex.R' failed
The error most likely occurred in:
> ### Name: ZINB
> ### Title: Fit Zero-Inflated Negative Binomial Model with Arbitrary
> ### Covariates and Prediction
> ### Aliases: ZINB
>
> ### ** Examples
>
> # ---- tiny example for users & CRAN (< 5s) ----
> set.seed(5)
> n <- 100
> base <- rnbinom(n, size = 5, mu = 7)
> zeros <- rbinom(n, 1, 0.25) # add extra zeros
> cases <- ifelse(zeros == 1, 0L, base)
> ## Don't show:
> stopifnot(length(cases) == n, all(cases >= 0))
> ## End(Don't show)
>
> # ---- actually fit the model, but only when JAGS is available ----
> ## Don't show:
> if (nzchar(Sys.which("jags")) && requireNamespace("R2jags", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)({ # examplesIf
+ ## End(Don't show)
+ fit <- ZINB(
+ cases = cases,
+ # optional priors if your API exposes them, e.g.:
+ # beta_prior_mean = 0, beta_prior_sd = 5,
+ # r_prior_shape = 2, r_prior_rate = 0.5,
+ n_iter = 400, # keep fast
+ n_burnin = 200,
+ n_chains = 1,
+ n_thin = 2
+ )
+ print(fit)
+
+
+ ## Not run:
+ ##D # ---- time-consuming / full demo ----
+ ##D if (nzchar(Sys.which("jags")) && requireNamespace("R2jags", quietly = TRUE)) {
+ ##D fit_full <- ZINB(
+ ##D cases = cases,
+ ##D n_iter = 100000,
+ ##D n_burnin = 10000,
+ ##D n_chains = 4,
+ ##D n_thin = 5
+ ##D )
+ ##D print(fit_full)
+ ##D }
+ ## End(Not run)
+
+ if (interactive()) {
+ # e.g., plot(fit)
+ }
+ ## Don't show:
+ }) # examplesIf
> fit <- ZINB(cases = cases, n_iter = 400, n_burnin = 200, n_chains = 1,
+ n_thin = 2)
Warning in jags.model(model.file, data = data, inits = init.values, n.chains = n.chains, :
Unused variable "pop" in data
Compiling model graph
Resolving undeclared variables
Allocating nodes
Graph information:
Fully observed stochastic nodes: 100
Unobserved stochastic nodes: 103
Total graph size: 914
Initializing model
Deleting model
Error in jags.model(model.file, data = data, inits = init.values, n.chains = n.chains, :
Error in node y[2]
Node inconsistent with parents
Calls: <Anonymous> ... withVisible -> eval -> eval -> ZINB -> <Anonymous> -> jags.model
Execution halted
- checking for unstated dependencies in 'tests' ... OK
- checking tests ... [2s] OK
Running 'testthat.R' [1s]
- checking PDF version of manual ... [19s] OK
- checking HTML version of manual ... [4s] OK
- DONE
Status: 1 ERROR