diff --git a/DESCRIPTION b/DESCRIPTION index d2173ea6..fba70367 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: blavaan Title: Bayesian Latent Variable Analysis -Version: 0.4-7.1085 +Version: 0.4-7 Authors@R: c(person(given = "Edgar", family = "Merkle", role = c("aut", "cre"), email = "merklee@missouri.edu", @@ -35,7 +35,7 @@ Description: Fit a variety of Bayesian latent variable models, including confirm License: GPL (>= 3) ByteCompile: true Depends: R(>= 3.5.0), methods, Rcpp(>= 0.12.15) -Imports: stats, utils, graphics, lavaan(>= 0.6-13), coda, mnormt, nonnest2(>= 0.5-5), loo(>= 2.0), rstan(>= 2.21.2), rstantools(>= 1.5.0), RcppParallel (>= 5.0.1), bayesplot, Matrix, future.apply, tmvnsim +Imports: stats, utils, graphics, lavaan(>= 0.6-14), coda, mnormt, nonnest2(>= 0.5-5), loo(>= 2.0), rstan(>= 2.21.2), rstantools(>= 1.5.0), RcppParallel (>= 5.0.1), bayesplot, Matrix, future.apply, tmvnsim LinkingTo: StanHeaders (>= 2.18.1), rstan (>= 2.21.2), BH (>= 1.69.0), Rcpp (>= 0.12.15), RcppEigen (>= 0.3.3.4.0), RcppParallel (>= 5.0.1) Suggests: runjags(>= 2.0.4-3), modeest(>= 2.3.3), rjags, cmdstanr, semTools, tinytest SystemRequirements: GNU make diff --git a/NEWS.md b/NEWS.md index 4319f2eb..c15a192c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,11 @@ +# Version 0.4-7 +## New features +* This is primarily an update to address a C++14 vs C++17 compilation issue identified by CRAN + +* But bugs from 0.4-6 have also been fixed + + + # Version 0.4-6 ## New features * For target = "stan", meanstructure=FALSE is allowed, along with use of sample.cov and sample.nobs instead of raw data diff --git a/R/postpred.R b/R/postpred.R index 88d2a0cb..eb14849c 100644 --- a/R/postpred.R +++ b/R/postpred.R @@ -69,7 +69,7 @@ postpred <- function(samplls = NULL, lavobject = NULL, measure = "logl", thin = mis <- FALSE if (any(is.na(unlist(lavdata@X)))) mis <- TRUE - loop.args <- list(X = 1:psamp, future.seed = TRUE, FUN = function(i){ + loop.args <- list(X = 1:psamp, FUN = function(i){ ## lists to store output (reduced after concatenated across chains) if (length(discFUN)) { ## Nested lists (iterations within discrepancy functions) @@ -194,7 +194,7 @@ postpred <- function(samplls = NULL, lavobject = NULL, measure = "logl", thin = lavoptions2$verbose <- FALSE lavoptions2$estimator <- "ML" if(catmod) lavoptions2$estimator <- "DWLS" - if(!lavoptions2$meanstructure) lavoptions2$missing <- 'listwise' ## to avoid "missing" ll calculations + if(!lavoptions2$meanstructure) lavoptions2$missing <- 'listwise' ## to avoid "missing" ll calculations, possibly from a bug in lavaan 0.6-13 lavoptions2$se <- "none" lavoptions2$test <- "standard" lavoptions2$optim.method <- "none" @@ -280,7 +280,7 @@ postpred <- function(samplls = NULL, lavobject = NULL, measure = "logl", thin = result <- list(ind = ind, csdist = csdist, csboots = csboots) result - }) + }, future.seed = TRUE) res <- do.call("future_lapply", loop.args)