R Under development (unstable) (2023-12-07 r85661 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 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. > library("bayescount") > > data <- array(dim=c(20,10,2)) > means1 <- rgamma(20, 10, 1) > means2 <- rgamma(20, 5, 1) > for(i in 1:20){ + data[i,,1] <- rpois(10, means1[i]) + data[i,,2] <- rpois(10, means2[i]) + } > # Missing data is permissible but means the likelihood cannot be > # calculated - a warning will be printed: > data[sample(1:(20*10*2), 10)] <- NA > try(unlink("analysis.ZILP.csv"), silent=TRUE) > # Run the analysis: > bayescount(name="analysis", data=data, model = "ZILP", + setnames=c("Simulated group A", "Simulated group B"), likelihood=TRUE) --- 'Bayescount': Analyse count data using a Bayesian distributional simulation model implemented in JAGS --- *PLEASE NOTE: THIS SOFTWARE IS INTENDED FOR EDUCATIONAL PURPOSES ONLY AND SHOULD NOT BE RELIED UPON FOR REAL WORLD APPLICATIONS* *ANALYSING DATA USING MCMC SAMPLING CAN PRODUCE MISLEADING RESULTS IF USED INAPPROPRIATELY* Settings are as follows: Name of analysis: analysis First column used for individual names: FALSE Number of datasets: 2 Number of animals in dataset one 20 Divide data by 1 Adjust mean by 1 Model to use: zero-inflated lognormal Poisson Omit datasets with all zero counts: TRUE Use alternative prior for variance : FALSE Adjust z-i means to mean of whole population: FALSE Calculate the likelihood for each model: TRUE Suppress JAGS output to screen: FALSE Write the results to file: TRUE System call to activate JAGS: C:/Program Files/JAGS/JAGS-4.3.1/x64/bin/jags-terminal.exe You are using R Under development (unstable) (2023-12-07 r85661 ucrt) on a windows machine, with the RTerm GUI JAGS version 4.3.1 found successfully using the command 'C:/Program Files/JAGS/JAGS-4.3.1/x64/bin/jags-terminal.exe' The rjags package is installed Testing the model function Finished running the simulation Test completed successfully Running the ZILP model for dataset 'Simulated group A'... Compiling rjags model... Analysing dataset using the ZILP model... Auto-run JAGS Running a pilot chain... Compiling rjags model... Calling the simulation using the rjags method... Adapting the model for 1000 iterations... Burning in the model for 4000 iterations... Running the model for 10000 iterations... Simulation complete Finished running the simulation Calculating the Gelman-Rubin statistic for 3 variables.... The Gelman-Rubin statistic is below 1.05 for all parameters Calculating the necessary sample length based on the Raftery and Lewis's diagnostic... Indicated sample length achieved Auto-run JAGS complete Calculating results *PLEASE NOTE: THIS SOFTWARE IS INTENDED FOR EDUCATIONAL PURPOSES ONLY AND SHOULD NOT BE RELIED UPON FOR REAL WORLD APPLICATIONS* Finished running the model Dataset 'Simulated group A' completed in 14.6 seconds with the ZILP model 1 of 2 datasets (50%) completed 14.6 seconds elapsed, estimated time remaining: 14 seconds 0 failed convergence, and 0 quit with an error Running the ZILP model for dataset 'Simulated group B'... Compiling rjags model... Analysing dataset using the ZILP model... Auto-run JAGS Running a pilot chain... Compiling rjags model... Calling the simulation using the rjags method... Adapting the model for 1000 iterations... Burning in the model for 4000 iterations... Running the model for 10000 iterations... Simulation complete Finished running the simulation Calculating the Gelman-Rubin statistic for 3 variables.... The Gelman-Rubin statistic is below 1.05 for all parameters Calculating the necessary sample length based on the Raftery and Lewis's diagnostic... Indicated sample length achieved Auto-run JAGS complete Calculating results *PLEASE NOTE: THIS SOFTWARE IS INTENDED FOR EDUCATIONAL PURPOSES ONLY AND SHOULD NOT BE RELIED UPON FOR REAL WORLD APPLICATIONS* Finished running the model Dataset 'Simulated group B' completed in 13.7 seconds with the ZILP model 2 of 2 datasets (100%) completed 28.4 seconds elapsed, estimated time remaining: 0 seconds 0 failed convergence, and 0 quit with an error All models completed. Total time taken: 28.4 seconds *PLEASE NOTE: THIS SOFTWARE IS INTENDED FOR EDUCATIONAL PURPOSES ONLY AND SHOULD NOT BE RELIED UPON FOR REAL WORLD APPLICATIONS* *ANALYSING DATA USING MCMC SAMPLING CAN PRODUCE MISLEADING RESULTS IF USED INAPPROPRIATELY* --- End --- Warning messages: 1: 'bayescount' is deprecated. Use 'fec.analysis' instead. See help("Deprecated") and help("bayescount-deprecated"). 2: In bayescount.single(model = model, data = setdata, alt.prior = alt.prior, : The likelihood computation is not available for unequal repeated measures so has not been calculated 3: In bayescount.single(model = model, data = setdata, alt.prior = alt.prior, : The likelihood computation is not available for unequal repeated measures so has not been calculated > unlink("analysis.ZILP.csv") > > proc.time() user system elapsed 22.53 0.71 32.84