Skip to content

Commit

Permalink
fix lv extraction for unequal numbers of level 1 & level 2 variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmerkle committed Aug 21, 2023
1 parent 8eed7c8 commit ce61b8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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.1147
Version: 0.4-9.1148
Authors@R: c(person(given = "Edgar", family = "Merkle",
role = c("aut", "cre"),
email = "merklee@missouri.edu",
Expand Down
2 changes: 2 additions & 0 deletions R/lvgqs.R
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ samp_lvs_2lev <- function(mcobj, lavmodel, lavsamplestats, lavdata, lavpartable,
standata$startrow <- c(1, standata$endrow[-length(standata$endrow)] + 1)
standata$YX <- cbind(clusmns, matrix(0, nrow(clusmns), 2))
standata$Ntot <- sum(standata$nclus[,2])
standata$Nobs <- with(standata, N_between + N_both)
standata$Obsvar <- with(standata, matrix(1:standata$Nobs, Np, N_between + N_both, byrow = TRUE))
tmpmat2[j,,] <- lvgqs(modmat2, standata)

## now level 1
Expand Down

0 comments on commit ce61b8a

Please sign in to comment.