diff --git a/DESCRIPTION b/DESCRIPTION index 4afcd61a..d407aec7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: blavaan Title: Bayesian Latent Variable Analysis -Version: 0.5-5.1300 +Version: 0.5-5.1302 Authors@R: c(person(given = "Edgar", family = "Merkle", role = c("aut", "cre"), email = "merklee@missouri.edu", diff --git a/R/lav_export_stanmarg.R b/R/lav_export_stanmarg.R index 3670c84e..63c2a523 100644 --- a/R/lav_export_stanmarg.R +++ b/R/lav_export_stanmarg.R @@ -1386,7 +1386,7 @@ lav2standata <- function(lavobject, dosam = FALSE) { dat$YX <- dat$YX[, -ordidx, drop=FALSE] - nlevs <- 1 + as.numeric( table(pta$th.idx[[1]]) ) + nlevs <- 1 + as.numeric( table(pta$th.idx[[1]][pta$th.idx[[1]] != 0L]) ) maxcat <- max(nlevs) dat$Nord <- length(ordidx)