diff --git a/DESCRIPTION b/DESCRIPTION index 8dfe688c..e650929f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: blavaan Title: Bayesian Latent Variable Analysis -Version: 0.5-6 +Version: 0.5-6.1304 Authors@R: c(person(given = "Edgar", family = "Merkle", role = c("aut", "cre"), email = "merklee@missouri.edu", @@ -35,12 +35,12 @@ 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-17), coda, mnormt, nonnest2(>= 0.5-6), loo(>= 2.0), rstan(>= 2.26.0), rstantools(>= 1.5.0), RcppParallel (>= 5.0.1), bayesplot, Matrix, future.apply, tmvnsim +Imports: stats, utils, graphics, lavaan(>= 0.6-17), coda, mnormt, nonnest2(>= 0.5-6.1304 LinkingTo: StanHeaders (>= 2.26.0), rstan (>= 2.26.0), 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 +Suggests: runjags(>= 2.0.4-3), modeest(>= 2.3.3), rjags, cmdstanr, semTools, bsam, tinytest SystemRequirements: GNU make NeedsCompilation: yes URL: https://ecmerkle.github.io/blavaan/, https://github.com/ecmerkle/blavaan BugReports: https://github.com/ecmerkle/blavaan/issues -Additional_repositories: https://stan-dev.r-universe.dev +Additional_repositories: https://stan-dev.r-universe.dev, https://ecmerkle.github.io/drat Config/Needs/website: brms diff --git a/R/blavaan.R b/R/blavaan.R index 09173968..7bae4a5c 100644 --- a/R/blavaan.R +++ b/R/blavaan.R @@ -696,8 +696,8 @@ blavaan <- function(..., # default lavaan arguments fext <- ifelse(target=="jags", "jag", "stan") fnm <- paste0(jagdir, "/sem.", fext) if(target %in% c("stan", "cmdstan")){ - if(FALSE){#mcmcextra$dosam){ - #cat(bsam::stanmodels$stanmarg_bsam@model_code, file = fnm) + if(mcmcextra$dosam){ + cat(bsam::stanmodels$stanmarg_bsam@model_code, file = fnm) } else { cat(stanmodels$stanmarg@model_code, file = fnm) } @@ -725,11 +725,11 @@ blavaan <- function(..., # default lavaan arguments init = inits)) } else if(target == "cmdstan"){ rjarg <- with(jagtrans, list(data = data, init = inits)) - } else if(FALSE){#mcmcextra$dosam){ - #rjarg <- with(jagtrans, list(object = bsam::stanmodels$stanmarg_bsam, - # data = data, - # pars = sampparms, - # init = inits)) + } else if(mcmcextra$dosam){ + rjarg <- with(jagtrans, list(object = bsam::stanmodels$stanmarg_bsam, + data = data, + pars = sampparms, + init = inits)) } else { rjarg <- with(jagtrans, list(object = stanmodels$stanmarg, data = data,