Skip to content

Commit

Permalink
multilevel: initialize blavaan object with 1-iteration lavaan run
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmerkle committed Aug 28, 2023
1 parent 7375a1d commit 687d4bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: blavaan
Title: Bayesian Latent Variable Analysis
Version: 0.4-9.1157
Version: 0.4-9.1158
Authors@R: c(person(given = "Edgar", family = "Merkle",
role = c("aut", "cre"),
email = "merklee@missouri.edu",
Expand Down
4 changes: 2 additions & 2 deletions R/blavaan.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ blavaan <- function(..., # default lavaan arguments
if(!any(is.na(unlist(lavInspect(LAV, 'data'))))) dotdotdot$missing <- "listwise"
}

# for initial values/parameter setup:
if(jag.do.fit & !any(lavInspect(LAV, 'nlevels') > 1)) {
# for initial values/some parameter setup:
if(jag.do.fit){
LAV2 <- try(do.call("lavaan", dotdotdot), silent = TRUE)
if(!inherits(LAV2, 'try-error')) LAV <- LAV2
}
Expand Down

0 comments on commit 687d4bf

Please sign in to comment.