Skip to content

Commit d8bfa3c

Browse files
committed
switch sign of fabin starting values (for lambda) if the marker is set to -1 (github issue 410)
1 parent bd710c5 commit d8bfa3c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: lavaan
22
Title: Latent Variable Analysis
3-
Version: 0.6-20.2263
3+
Version: 0.6-20.2264
44
Authors@R: c(person(given = "Yves", family = "Rosseel",
55
role = c("aut", "cre"),
66
email = "[email protected]",

R/lav_start.R

+6
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,12 @@ lav_start <- function(start.method = "default",
302302
tmp <- rep(1.0, length(tmp))
303303
}
304304
}
305+
306+
# check for negative marker
307+
if (!std.lv && lavpartable$ustart[lambda.idx[1]] < 0) {
308+
tmp <- -1 * tmp
309+
}
310+
305311
start[lambda.idx] <- tmp
306312

307313
# factor variance

0 commit comments

Comments
 (0)