fixstart: Attempt to Fix Starting Values

View source: R/e_modelmodifications_fixstart.R

fixstartR Documentation

Attempt to Fix Starting Values

Description

This function attempts to fix starting values by comparing the analytic gradient to a numerically approximated gradient. Parameters with a difference between the analytic and numeric gradient that exceeds 'maxdiff' will be reduced by a factor of 'reduce' in each iteration until the average absolute difference between analytic and numeric gradients is lower than 'tol'. Only off-diagonal elements in omega, sigma, kappa, lowertri or rho matrices or any element in beta matrices are adjusted.

Usage

fixstart(x, reduce = 0.5, maxdiff = 0.1, tol = 0.01, maxtry = 25)

Arguments

x

A 'psychonetrics' model

reduce

The factor with which problematic parameters are reduced in each iteration.

maxdiff

Maximum difference between analytic and numeric gradient to be considered problematic.

tol

Average absolute difference between analytic and numeric gradient that is considered acceptable.

maxtry

Maximum number of iterations to attempt to fix starting values.

Author(s)

Sacha Epskamp


psychonetrics documentation built on June 22, 2024, 10:29 a.m.