Skip to content

Commit

Permalink
add 'rstarts' argument to man page of lavOptions()
Browse files Browse the repository at this point in the history
  • Loading branch information
yrosseel committed Jun 29, 2024
1 parent 3da5327 commit 89276a4
Show file tree
Hide file tree
Showing 3 changed files with 13 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-19.2168
Version: 0.6-19.2169
Authors@R: c(person(given = "Yves", family = "Rosseel",
role = c("aut", "cre"),
email = "Yves.Rosseel@UGent.be",
Expand Down
1 change: 1 addition & 0 deletions R/lav_object_generate.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ lav_object_independence <- function(object = NULL,
lavoptions$check.post <- FALSE
lavoptions$check.vcov <- FALSE
lavoptions$optim.bounds <- list() # we already have the bounds
lavoptions$start <- "default" # don't re-use user-specified starting values
lavoptions$rstarts <- 0L # no random starts

# ALWAYS do.fit and set optim.method = "nlminb" (if npar > 0)
Expand Down
11 changes: 11 additions & 0 deletions man/lavOptions.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,17 @@ Starting values options:
\code{paramaterEstimates()} function, the values of the \code{est} or
\code{start} or \code{ustart} column (whichever is found first) will be
extracted.}
\item{\code{rstarts}:}{Integer. The number of refits that lavaan should
try with random starting values. Random starting values are computed
by drawing random numbers from a uniform distribution. Correlations
are drawn from the interval [-0.5, +0.5] and then converted to
covariances. Lower and upper bounds for (residual) variances are
computed just like the standard bounds in bounded estimation.
Random starting values are not computed for regression coefficients
(which are always zero) and factor loadings of higher-order constructs
(which are always unity). From all the runs that converged, the final
solution is the one that resulted in the smallest value for the
discrepancy function.}
}

Check options:
Expand Down

0 comments on commit 89276a4

Please sign in to comment.