Skip to content

Commit

Permalink
ensure a group column exists in the partable
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmerkle committed Mar 25, 2024
1 parent 1fe0549 commit 4cac887
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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.5-3.1249
Version: 0.5-3.1251
Authors@R: c(person(given = "Edgar", family = "Merkle",
role = c("aut", "cre"),
email = "[email protected]",
Expand Down
5 changes: 4 additions & 1 deletion R/blavaan.R
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,10 @@ blavaan <- function(..., # default lavaan arguments
LAV@ParTable$rhs %in% LAV@ParTable$plabel[cov.pars]) &
LAV@ParTable$op == "=="))
if(con.cov) LAV@Options$auto.cov.lv.x <- FALSE


# ensure group is in the parTable
if(!("group" %in% names(LAV@ParTable))) LAV@ParTable$group <- rep(1L, length(LAV@ParTable$lhs))

# if std.lv, truncate the prior of each lv's first loading
loadpt <- LAV@ParTable$op == "=~"
lvs <- unique(LAV@ParTable$lhs[loadpt])
Expand Down

0 comments on commit 4cac887

Please sign in to comment.