Running examples in ‘PoolTestR-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: PoolRegBayes
> ### Title: Bayesian Mixed or Fixed Effect Logistic Regression with
> ###   Presence/Absence Tests on Pooled Samples
> ### Aliases: PoolRegBayes
> 
> ### ** Examples
> 
> # Perform logistic-type regression modelling for a synthetic dataset consisting
> # of pools (sizes 1, 5, or 10) taken from 4 different regions and 3 different
> # years. Within each region specimens are collected at 4 different villages,
> # and within each village specimens are collected at 8 different sites.
> 
> 
> ### Models in a frequentist framework
> #ignoring hierarchical sampling frame within each region
> Mod <- PoolReg(Result ~ Region + Year,
+                data = SimpleExampleData,
+                poolSize = NumInPool)
[1] "Model has no group/random effects. Using a fixed effect model (glm)"
> summary(Mod)

Call:
stats::glm(formula = formula, family = stats::binomial(PoolLink(data[[poolSize]])), 
    data = data)

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept) -1.97190    0.12559 -15.701  < 2e-16 ***
RegionB     -1.20591    0.17890  -6.741 1.58e-11 ***
RegionC     -2.40943    0.27082  -8.897  < 2e-16 ***
RegionD     -0.11001    0.14466  -0.760   0.4470    
Year        -0.13874    0.07716  -1.798   0.0722 .  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1304.34  on 1151  degrees of freedom
Residual deviance:  990.58  on 1147  degrees of freedom
AIC: 1000.6

Number of Fisher Scoring iterations: 6

> 
> #accounting hierarchical sampling frame within each region
> HierMod <- PoolReg(Result ~ Region + Year + (1|Village) + (1|Site),
+                    data = SimpleExampleData,
+                    poolSize = NumInPool)
[1] "Detected group/random effects. Using a mixed effect model (glmer)"
Error: Downdated VtV is not positive definite
Execution halted