.computeInitialHessian | R Documentation |
computes the initial Hessian used in the optimization. Because we use the parameter estimates from lavaan as starting values, it typcially makes sense to just use the Hessian of the lavaan model as initial Hessian
.computeInitialHessian(
initialHessian,
rawParameters,
lavaanModel,
SEM,
addMeans,
stepSize,
notes = NULL
)
initialHessian |
option to provide an initial Hessian to the optimizer. Must have row and column names corresponding to the parameter labels. use getLavaanParameters(lavaanModel) to see those labels. If set to "scoreBased", the outer product of the scores will be used as an approximation (see https://en.wikipedia.org/wiki/Berndt%E2%80%93Hall%E2%80%93Hall%E2%80%93Hausman_algorithm). If set to "compute", the initial hessian will be computed. If set to a single value, a diagonal matrix with the single value along the diagonal will be used. The default is "lavaan" which extracts the Hessian from the lavaanModel. This Hessian will typically deviate from that of the internal SEM represenation of lessSEM (due to the transformation of the variances), but works quite well in practice. |
rawParameters |
vector with raw parameters |
lavaanModel |
lavaan model object |
SEM |
internal SEM representation |
addMeans |
should a mean structure be added to the model? |
stepSize |
initial step size |
notes |
option to pass a notes to function. All notes of the current function will be added |
Hessian matrix and notes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.