Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

checkConvergence

Internal: Check convergence


Description

Check convergence of an algorithm using one of the following criteria:

diff_absolute

Checks if the largest elementwise absolute difference between two matrices .W_new and W.old is smaller than a given tolerance.

diff_squared

Checks if the largest elementwise squared difference between two matrices .W_new and W.old is smaller than a given tolerance.

diff_relative

Checks if the largest elementwise absolute rate of change (new - old / new) for two matrices .W_new and W.old is smaller than a given tolerance.

Usage

checkConvergence(
  .W_new          = args_default()$.W_new,
  .W_old          = args_default()$.W_old,
  .conv_criterion = args_default()$.conv_criterion,
  .tolerance      = args_default()$.tolerance
  )

Arguments

.W_new

A (J x K) matrix of weights.

.W_old

A (J x K) matrix of weights.

.conv_criterion

Character string. The criterion to use for the convergence check. One of: "diff_absolute", "diff_squared", or "diff_relative". Defaults to "diff_absolute".

.tolerance

Double. The tolerance criterion for convergence. Defaults to 1e-05.

Value

TRUE if converged; FALSE otherwise.


cSEM

Composite-Based Structural Equation Modeling

v0.4.0
GPL-3
Authors
Manuel E. Rademaker [aut, cre] (<https://orcid.org/0000-0002-8902-3561>), Florian Schuberth [aut] (<https://orcid.org/0000-0002-2110-9086>), Tamara Schamberger [ctb] (<https://orcid.org/0000-0002-7845-784X>), Michael Klesel [ctb] (<https://orcid.org/0000-0002-2884-1819>), Theo K. Dijkstra [ctb], Jörg Henseler [ctb] (<https://orcid.org/0000-0002-9736-3048>)
Initial release
2021-04-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.