Skip to content

Commit

Permalink
switch sign of fabin starting values (for lambda) if the marker is se…
Browse files Browse the repository at this point in the history
…t to -1 (github issue 410)
  • Loading branch information
yrosseel committed Feb 4, 2025
1 parent bd710c5 commit d8bfa3c
Show file tree
Hide file tree
Showing 2 changed files with 7 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: lavaan
Title: Latent Variable Analysis
Version: 0.6-20.2263
Version: 0.6-20.2264
Authors@R: c(person(given = "Yves", family = "Rosseel",
role = c("aut", "cre"),
email = "[email protected]",
Expand Down
6 changes: 6 additions & 0 deletions R/lav_start.R
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,12 @@ lav_start <- function(start.method = "default",
tmp <- rep(1.0, length(tmp))
}
}

# check for negative marker
if (!std.lv && lavpartable$ustart[lambda.idx[1]] < 0) {
tmp <- -1 * tmp
}

start[lambda.idx] <- tmp

# factor variance
Expand Down

0 comments on commit d8bfa3c

Please sign in to comment.