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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: PMC
> ### Title: Population Monte Carlo
> ### Aliases: PMC
> ### Keywords: High Performance Computing Importance Sampling Monte Carlo
> 
> ### ** Examples
> 
> # The accompanying Examples vignette is a compendium of examples.
> ####################  Load the LaplacesDemon Library  #####################
> library(LaplacesDemon)
> 
> ##############################  Demon Data  ###############################
> data(demonsnacks)
> y <- log(demonsnacks$Calories)
> X <- cbind(1, as.matrix(log(demonsnacks[,c(1,4,10)]+1)))
> J <- ncol(X)
> for (j in 2:J) X[,j] <- CenterScale(X[,j])
> 
> #########################  Data List Preparation  #########################
> mon.names <- "LP"
> parm.names <- as.parm.names(list(beta=rep(0,J), sigma=0))
> pos.beta <- grep("beta", parm.names)
> pos.sigma <- grep("sigma", parm.names)
> PGF <- function(Data) {
+      beta <- rnorm(Data$J)
+      sigma <- runif(1)
+      return(c(beta, sigma))
+      }
> MyData <- list(J=J, PGF=PGF, X=X, mon.names=mon.names,
+      parm.names=parm.names, pos.beta=pos.beta, pos.sigma=pos.sigma, y=y)
> 
> ##########################  Model Specification  ##########################
> Model <- function(parm, Data)
+      {
+      ### Parameters
+      beta <- parm[Data$pos.beta]
+      sigma <- interval(parm[Data$pos.sigma], 1e-100, Inf)
+      parm[Data$pos.sigma] <- sigma
+      ### Log-Prior
+      beta.prior <- sum(dnormv(beta, 0, 1000, log=TRUE))
+      sigma.prior <- dhalfcauchy(sigma, 25, log=TRUE)
+      ### Log-Likelihood
+      mu <- tcrossprod(Data$X, t(beta))
+      LL <- sum(dnorm(Data$y, mu, sigma, log=TRUE))
+      ### Log-Posterior
+      LP <- LL + beta.prior + sigma.prior
+      Modelout <- list(LP=LP, Dev=-2*LL, Monitor=LP,
+           yhat=rnorm(length(mu), mu, sigma), parm=parm)
+      return(Modelout)
+      }
> 
> set.seed(666)
> 
> ############################  Initial Values  #############################
> Initial.Values <- GIV(Model, MyData, PGF=TRUE)
> 
> ########################  Population Monte Carlo  #########################
> Fit <- PMC(Model, MyData, Initial.Values, Covar=NULL, Iterations=5,
+      Thinning=1, alpha=NULL, M=1, N=100, CPUs=1)

PMC was called on Thu Apr 14 16:11:54 2022

Performing initial checks...

PMC is beginning to update...
Iteration: 1,   ESSN: 0.01,   Perplexity: 0.01
Iteration: 2,   ESSN: 0.02584,   Perplexity: 0.03723
Iteration: 3,   ESSN: 0.0171,   Perplexity: 0.03094
Iteration: 4,   ESSN: 0.04821,   Perplexity: 0.10666
Iteration: 5Error in chol.default(Sigma) : 
  the leading minor of order 5 is not positive definite
Calls: PMC -> rmvt -> rmvn -> chol -> chol.default
Execution halted