Running examples in 'bayesLopod-Ex.R' failed
The error most likely occurred in:

> ### Name: modelLopod
> ### Title: Run a Bayes inference of Landscape Occupancy from Presence-Only
> ###   Data on Stan
> ### Aliases: modelLopod
> 
> ### ** Examples
> 
> data("simSpRecords", package = "bayesLopod")
> data("simSpSamplingEffort", package = "bayesLopod")
> simSpRasters = xyToRaster(xyRecords = simSpRecords,xySamplingEffort = simSpSamplingEffort,
+ basemap = NULL, nrows = 10, extentExpansion = 0)
> ld_Raster = rasterLopodData(rasterN = simSpRasters[["samplingEffort"]],
+ rasterY = simSpRasters[["spDetections"]], Adjacency = FALSE )
Extrapolation into not-sampled cells cannot be performed without an adjacency matrix 
> mLopodRaster = modelLopod(LopodData = ld_Raster, varP = TRUE, q = NULL,
+ pmin = 0, CAR = FALSE, nChains = 1,warmup = 10,sampling = 10,nCores = 1)
Global q estimated. Psi and P for each sampling unit

SAMPLING FOR MODEL 'psiipiq' NOW (CHAIN 1).

Gradient evaluation took 0 seconds
1000 transitions using 10 leapfrog steps per transition would take 0 seconds.
Adjust your expectations accordingly!


WARNING: No variance estimation is
         performed for num_warmup < 20

Iteration:  1 / 20 [  5%]  (Warmup)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration:  2 / 20 [ 10%]  (Warmup)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration:  4 / 20 [ 20%]  (Warmup)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration:  6 / 20 [ 30%]  (Warmup)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration:  8 / 20 [ 40%]  (Warmup)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration: 10 / 20 [ 50%]  (Warmup)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration: 11 / 20 [ 55%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration: 12 / 20 [ 60%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration: 14 / 20 [ 70%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration: 16 / 20 [ 80%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration: 18 / 20 [ 90%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)

Iteration: 20 / 20 [100%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)


 Elapsed Time: 1.158 seconds (Warm-up)
               3.178 seconds (Sampling)
               4.336 seconds (Total)

 [1] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [2] "Exception: validate transformed params: qRate is nan, but must be greater than or equal to 0  (in 'model_psiipiq' at line 25)"         
 [3] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [4] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [5] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [6] "Exception: validate transformed params: qRate is nan, but must be greater than or equal to 0  (in 'model_psiipiq' at line 25)"         
 [7] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [8] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [9] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[10] "Exception: validate transformed params: qRate is nan, but must be greater than or equal to 0  (in 'model_psiipiq' at line 25)"         
[11] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[12] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[13] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[14] "Exception: validate transformed params: qRate is nan, but must be greater than or equal to 0  (in 'model_psiipiq' at line 25)"         
[15] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[16] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[17] "Error in sampler$call_sampler(args_list[[i]]) : "                                                                                      
[18] "  Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipiq' at line 108)"          
[1] "error occurred during calling the sampler; sampling not done"
> 
> data("Andropogon_shape", package = "bayesLopod")
> ld_Shape = shapeLopodData(Shapefile = Andropogon_shape, fieldN = "sampEffort",
+ fieldY = "detections",  Adjacency = FALSE, keepFields = FALSE)
> mLopodShape = modelLopod(LopodData = ld_Shape, varP = FALSE, q = NULL,
+ pmin = 0, CAR = FALSE, nChains = 1,warmup = 5,sampling = 5,nCores = 1)
Global p and q estimated. Psi for each sampling unit.

SAMPLING FOR MODEL 'psiipq' NOW (CHAIN 1).

Gradient evaluation took 0 seconds
1000 transitions using 10 leapfrog steps per transition would take 0 seconds.
Adjust your expectations accordingly!


WARNING: No variance estimation is
         performed for num_warmup < 20

Iteration: 1 / 10 [ 10%]  (Warmup)
Iteration: 2 / 10 [ 20%]  (Warmup)
Iteration: 4 / 10 [ 40%]  (Warmup)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipq' at line 95)

Iteration: 6 / 10 [ 60%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipq' at line 95)

Iteration: 7 / 10 [ 70%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipq' at line 95)

Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipq' at line 95)

Iteration: 9 / 10 [ 90%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipq' at line 95)

Iteration: 10 / 10 [100%]  (Sampling)
Exception: bernoulli_rng: Probability parameter is 1, but must be in the interval [0, 1]  (in 'model_psiipq' at line 95)


 Elapsed Time: 0.031 seconds (Warm-up)
               0.031 seconds (Sampling)
               0.062 seconds (Total)

Error in validObject(.Object) : 
  invalid class "stanfit" object: The following variables have undefined values:  sim_y[1],The following variables have undefined values:  sim_y[2],The following variables have undefined values:  sim_y[3],The following variables have undefined values:  sim_y[4],The following variables have undefined values:  sim_y[5],The following variables have undefined values:  sim_y[6],The following variables have undefined values:  sim_y[7],The following variables have undefined values:  sim_y[8],The following variables have undefined values:  sim_y[9],The following variables have undefined values:  sim_y[10],The following variables have undefined values:  sim_y[11],The following variables have undefined values:  sim_y[12],The following variables have undefined values:  sim_y[13],The following variables have undefined values:  sim_y[14],The following variables have undefined values:  sim_y[15],The following variables have undefined values:  sim_y[16],The following variables have undefined 
Calls: modelLopod ... .local -> new -> initialize -> initialize -> validObject
Execution halted