Skip to content

Commit

Permalink
improve warnings about non-diagonal/non-block covariance matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmerkle committed Nov 2, 2023
1 parent b8ac94f commit 2620a67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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-2.1191
Version: 0.5-2.1192
Authors@R: c(person(given = "Edgar", family = "Merkle",
role = c("aut", "cre"),
email = "[email protected]",
Expand Down
7 changes: 4 additions & 3 deletions R/blavaan.R
Original file line number Diff line number Diff line change
Expand Up @@ -1096,11 +1096,12 @@ blavaan <- function(..., # default lavaan arguments
lavInspect(blavaan, "post.check")
}

if( (target == "stan" && !l2s$blkpsi) ||
(target != "stan" && with(covres, !(diagpsi | fullpsi))) ) {
if( "psi" %in% lavpartable$mat &&
( (target == "stan" && !l2s$blkpsi) ||
(target != "stan" && with(covres, !(diagpsi | fullpsi))) ) ) {
warning("blavaan WARNING: As specified, the psi covariance matrix is neither diagonal nor unrestricted, so the actual prior might differ from the stated prior. See\n https://arxiv.org/abs/2301.08667", call. = FALSE)
}
if( with(covres, !(diagthet | fullthet)) ) {
if( "theta" %in% lavpartable$mat && with(covres, !(diagthet | fullthet)) ) {
warning("blavaan WARNING: As specified, the theta covariance matrix is neither diagonal nor unrestricted, so the actual prior might differ from the stated prior. See\n https://arxiv.org/abs/2301.08667", call. = FALSE)
}

Expand Down

0 comments on commit 2620a67

Please sign in to comment.