From 89276a46075bc3032e402b9de1ae54c6dc47bd1f Mon Sep 17 00:00:00 2001 From: Yves Rosseel Date: Sat, 29 Jun 2024 17:25:58 +0200 Subject: [PATCH] add 'rstarts' argument to man page of lavOptions() --- DESCRIPTION | 2 +- R/lav_object_generate.R | 1 + man/lavOptions.Rd | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index f7008df6..cb12b1c3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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", diff --git a/R/lav_object_generate.R b/R/lav_object_generate.R index 9a97999a..de5ddb88 100644 --- a/R/lav_object_generate.R +++ b/R/lav_object_generate.R @@ -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) diff --git a/man/lavOptions.Rd b/man/lavOptions.Rd index 6fc5cb06..48cfb6b4 100644 --- a/man/lavOptions.Rd +++ b/man/lavOptions.Rd @@ -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: