Skip to content

Commit

Permalink
[SAM] se = "local" now also works with exogenous covariates/outcomes
Browse files Browse the repository at this point in the history
  • Loading branch information
yrosseel committed Nov 14, 2024
1 parent 89bbc3a commit 010b6da
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: lavaan
Title: Latent Variable Analysis
Version: 0.6-20.2231
Version: 0.6-20.2232
Authors@R: c(person(given = "Yves", family = "Rosseel",
role = c("aut", "cre"),
email = "[email protected]",
Expand Down
3 changes: 2 additions & 1 deletion R/lav_sam_step1.R
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,8 @@ lav_sam_step1_local_jac <- function(STEP1 = NULL, FIT = NULL,
}
# keep only 'LAMBDA/THETA' parameters
PT <- FIT@ParTable
ov.names <- lavdata@ov.names[[g]]
# only ov.names that are actually used in the measurement models
ov.names <- unique(unlist(lapply(STEP1$MM.FIT, lavNames, "ov")))
lambda.idx <- which(PT$op == "=~" & PT$free > 0L)
theta.idx <- which(PT$op == "~~" & PT$free > 0L &
PT$lhs %in% ov.names & PT$rhs %in% ov.names)
Expand Down

0 comments on commit 010b6da

Please sign in to comment.