Extract Hessian matrixes from a fitted `pk` object
# S3 method for pk
get_hessian(obj, model = NULL, method = NULL, suppress.messages = TRUE, ...)
A dataframe with one row for each `data_group`, `model` and `method`. The remaining column is a `list` column containing the Hessian for each row.
A [pk] object
Optional: Specify one or more of the fitted models whose coefficients to return. If NULL (the default), coefficients will be returned for all of the models in `obj$stat_model`.
Optional: Specify one or more of the [optimx::optimx()] methods whose coefficients to return. If NULL (the default), coefficients will be returned for all of the models in `obj$settings_optimx$method`.
Logical. `TRUE` (the default) to suppress informative messages. `FALSE` to see them.
Additional arguments. Not in use right now.
Caroline Ring and Gilberto Padilla Mercado
This function computes a numerical approximation to the model Hessian for each data group and each model in a fitted `pk` object. The Hessian is the matrix of second derivatives of the model objective function with respect to each model parameter. Here, the objective function is the negative log-likelihood implemented in [log_likelihood()], evaluated jointly across the data that was used to fit the model.
Gill J, King G. (2004) What to Do When Your Hessian is Not Invertible: Alternatives to Model Respecification in Nonlinear Estimation. Sociological Methods & Research 33(1):54-87. DOI: 10.1177/0049124103262681
Other methods for fitted pk objects:
AAFE.pk()
,
AFE.pk()
,
AIC.pk()
,
BIC.pk()
,
coef.pk()
,
coef_sd.pk()
,
eval_tkstats.pk()
,
get_fit.pk()
,
get_tkstats.pk()
,
logLik.pk()
,
predict.pk()
,
residuals.pk()
,
rmse.pk()
,
rsq.pk()