Skip to content

Commit

Permalink
fix covariance matrix check in two-level models
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmerkle committed Sep 19, 2024
1 parent 805057a commit 2d14cc0
Show file tree
Hide file tree
Showing 2 changed files with 3 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-6.1307
Version: 0.5-6.1308
Authors@R: c(person(given = "Edgar", family = "Merkle",
role = c("aut", "cre"),
email = "[email protected]",
Expand Down
3 changes: 2 additions & 1 deletion R/blav_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ checkcovs <- function(lavobject){
## surprising if this happens:
fullthet <- all(unlist(thetnums) > 0L, na.rm = TRUE) & (anyDuplicated(unlist(thetnums), MARGIN = 0) == 0L)
## check for blocks of free covariances that have no impact on each other
## FIXME
thetblk <- sapply(thets, function(x) {
x[!lower.tri(x)] <- 0
frnums <- which(x > 0, arr.ind = TRUE)
Expand All @@ -442,7 +443,7 @@ checkcovs <- function(lavobject){
blk <- TRUE
}
blk} )
blkt <- all(thetblk)
blkt <- all(unlist(thetblk))
} else {
diagthet <- FALSE
fullthet <- TRUE
Expand Down

0 comments on commit 2d14cc0

Please sign in to comment.