R Under development (unstable) (2025-08-19 r88650 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # example 1: GasolineYield > library(zoib) Loading required package: rjags Loading required package: coda Linked to JAGS 4.3.1 Loaded modules: basemod,bugs Loading required package: abind Loading required package: Formula > data("GasolineYield", package = "zoib") > > # zoib: fixed > eg.fixed <- zoib(yield ~ temp + as.factor(batch)| 1, data=GasolineYield, + joint = FALSE, random = 0, EUID = 1:nrow(GasolineYield), + zero.inflation = FALSE, one.inflation = FALSE, + n.iter = 11, n.thin = 2, n.burn=1, seeds=c(1,2,3),n.chain=3) [1] "***************************************************************************" [1] "* List of parameter for which the posterior samples are generated *" [1] "* b: regression coeff in the linear predictor for the mean of beta dist'n *" [1] "* d: regression coeff in the linear predictor for the sum of the two *" [1] "* shape parameters in the beta distribution *" [1] "* b0: regression coeff in the linear predictor for Prob(y=0) *" [1] "* b1: regression coeff in the linear predictor for Prob(y=1) *" [1] "***************************************************************************" Compiling model graph Resolving undeclared variables Allocating nodes Graph information: Observed stochastic nodes: 32 Unobserved stochastic nodes: 64 Total graph size: 1398 Initializing model NOTE: Stopping adaptation [1] "NOTE: in the header of Markov Chain Monte Carlo (MCMC) output of " [1] "parameters (coeff), predicted values (ypred), residuals (resid), and" [1] "standardized residuals (resid.std), *Start, End, Thinning Interval* " [1] "values are after the initial burning and thinning periods specified " [1] "by the user. For example, n.iter = 151, n.thin = 2, n.burn=1, " [1] "then MCMC header of the *coeff* output would read as follows " [1] "--------------------------------------------------------------------" [1] "Markov Chain Monte Carlo (MCMC) output:" [1] "Start = 1" [1] "End = 75" [1] "Thinning interval = 1" [1] "--------------------------------------------------------------------" [1] " " [1] "Coefficients are presented in the order of b, b0 (if zero.inflation=TRUE)," [1] "b1 (if one.inflation=TRUE), and d. If the names of independent variables X" [1] "are not shown for the coefficients within each type (b, b0, b1, d), the " [1] "first coeffient is always the intercept, followed the coefficients for the" [1] "X's in the order as how they are entered in the model specification. " [1] "--------------------------------------------------------------------------" > sample1 <- eg.fixed$coeff > #dic.samples(eg.fixed $MCMC.model, n.iter=51,thin=2,n.burn=1) > > # zoib: random > eg.random <- zoib(yield ~ temp | 1 | 1, data=GasolineYield, + joint = FALSE, random=1, EUID=GasolineYield$batch, + zero.inflation = FALSE, one.inflation = FALSE, + n.iter=11, n.thin=2, n.burn=1) [1] "***************************************************************************" [1] "* List of parameter for which the posterior samples are generated *" [1] "* b: regression coeff in the linear predictor for the mean of beta dist'n *" [1] "* d: regression coeff in the linear predictor for the sum of the two *" [1] "* shape parameters in the beta distribution *" [1] "* b0: regression coeff in the linear predictor for Prob(y=0) *" [1] "* b1: regression coeff in the linear predictor for Prob(y=1) *" [1] "***************************************************************************" Compiling model graph Resolving undeclared variables Allocating nodes Graph information: Observed stochastic nodes: 32 Unobserved stochastic nodes: 22 Total graph size: 1160 Initializing model NOTE: Stopping adaptation [1] "NOTE: in the header of Markov Chain Monte Carlo (MCMC) output of " [1] "parameters (coeff), predicted values (ypred), residuals (resid), and" [1] "standardized residuals (resid.std), *Start, End, Thinning Interval* " [1] "values are after the initial burning and thinning periods specified " [1] "by the user. For example, n.iter = 151, n.thin = 2, n.burn=1, " [1] "then MCMC header of the *coeff* output would read as follows " [1] "--------------------------------------------------------------------" [1] "Markov Chain Monte Carlo (MCMC) output:" [1] "Start = 1" [1] "End = 75" [1] "Thinning interval = 1" [1] "--------------------------------------------------------------------" [1] " " [1] "Coefficients are presented in the order of b, b0 (if zero.inflation=TRUE)," [1] "b1 (if one.inflation=TRUE), and d. If the names of independent variables X" [1] "are not shown for the coefficients within each type (b, b0, b1, d), the " [1] "first coeffient is always the intercept, followed the coefficients for the" [1] "X's in the order as how they are entered in the model specification. " [1] "--------------------------------------------------------------------------" > sample2 <- eg.random$coeff > > > proc.time() user system elapsed 0.87 0.14 0.98