get_hessian.pk {invivoPKfit}R Documentation

Get Hessian matrixes

Description

Extract Hessian matrixes from a fitted 'pk' object

Usage

## S3 method for class 'pk'
get_hessian(obj, model = NULL, method = NULL, suppress.messages = TRUE, ...)

Arguments

obj

A [pk] object

model

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'.

method

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'.

suppress.messages

Logical. 'TRUE' (the default) to suppress informative messages. 'FALSE' to see them.

...

Additional arguments. Not in use right now.

Details

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.

Value

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.

Author(s)

Caroline Ring and Gilberto Padilla Mercado

References

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

See Also

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()


[Package invivoPKfit version 2.0.1 Index]